Opened 15 years ago

Closed 15 years ago

#41 closed enhancement (fixed)

Compilation of single-/double-float arithmetic to immediate byte code

Reported by: ehuelsmann Owned by: ehuelsmann
Priority: major Milestone:
Component: compiler Version:
Keywords: Cc:
Parent Tickets:


Currently, the following code

(lambda (x)

(declare (double-float x))
(+ 3.0e0

(* 12.0e0 x)))


disassembles to a call to a LispObject function for + and one for *.

However, this code could be more efficient if only 1 new object would be required. This can be achieved by unboxing X, then doing the math in Java byte code and boxing the result before it's returned.

Change History (1)

comment:1 Changed 15 years ago by ehuelsmann

Resolution: fixed
Status: newclosed

The example above has been realised, hence, closing this issue - further more, all intermediate results which don't get stored into registers won't be boxed now. However, local variables of float types don't get stored unboxed yet. Opening a new issue for it.

Note: See TracTickets for help on using tickets.