This patch adds 5 new VM instructions (br-if-f64-<, br-if-f64-<=, br-if-f64-=, br-if-f64->, br-if-f64->=) and a compiler optimization to perform unboxed floating point number comparisons where possible. Take this contrived example code: (lambda () (let ((foo (f64vector 1 2 3))) (< (f64vector-ref foo 0) (f64vector-ref foo 1)))) Here is the disassembly without the optimization: 0 (assert-nargs-ee/locals 1 6) ;; 7 slots (0 args) at (unknown file):131:3 1 (make-short-immediate 6 1028) ;; #t 2 (toplevel-box 5 104 88 102 #t) ;; `f64vector' 7 (box-ref 3 5) 8 (make-short-immediate 2 6) ;; 1 9 (make-short-immediate 1 10) ;; 2 10 (make-short-immediate 0 14) ;; 3 11 (handle-interrupts) at (unknown file):132:37 12 (call 3 4) 14 (receive 1 3 7) 16 (load-u64 4 0 0) at (unknown file):133:31 19 (bv-f64-ref 4 5 4) 20 (f64->scm 4 4) 21 (load-u64 3 0 8) at (unknown file):134:31 24 (bv-f64-ref 5 5 3) 25 (f64->scm 5 5) 26 (br-if-< 4 5 #f 4) ;; -> L1 at (unknown file):133:28 29 (make-short-immediate 6 4) ;; #f L1: 30 (handle-interrupts) 31 (mov 5 6) 32 (return-values 2) ;; 1 value And here is the disassembly with the optimization: 0 (assert-nargs-ee/locals 1 6) ;; 7 slots (0 args) at (unknown file):1:3 1 (make-short-immediate 6 1028) ;; #t 2 (toplevel-box 5 102 86 100 #t) ;; `f64vector' 7 (box-ref 3 5) 8 (make-short-immediate 2 6) ;; 1 9 (make-short-immediate 1 10) ;; 2 10 (make-short-immediate 0 14) ;; 3 11 (handle-interrupts) at (unknown file):2:37 12 (call 3 4) 14 (receive 1 3 7) 16 (load-u64 4 0 0) at (unknown file):3:31 19 (bv-f64-ref 4 5 4) 20 (load-u64 3 0 8) at (unknown file):4:31 23 (bv-f64-ref 5 5 3) 24 (br-if-f64-< 4 5 #f 4) ;; -> #f at (unknown file):3:28 27 (make-short-immediate 6 4) ;; #f 28 (handle-interrupts) 29 (mov 5 6) 30 (return-values 2) ;; 1 value Much better! The f64->scm instructions have been eliminated. This greatly improves performance for things like realtime simulations that do lots of floating point vector and matrix arithmetic. Many thanks to Andy for already implementing this optimization for u64s which I shamelessly copied from and for the additional guidance on IRC.