Skip to content
Snippets Groups Projects
Commit 8f5f6abc authored by Raymond Toy's avatar Raymond Toy
Browse files

Micro-optimize SCALE-FLOAT to use multiplication when possible.

If the exponent (second arg of SCALE-FLOAT) is such that 2^exponent
can be represented as a float (single or double), we can implement
SCALE-FLOAT using a multiplication by 2^exponent, since multiplication
by 2^exponent is exact.

 * src/compiler/float-tran.lisp:
   * Update deftransforms for SCALE-FLOAT to do a multiply when
     possible. 
 * tests/float-tran.lisp:
   * Add tests to make sure the deftransforms for SCALE-FLOAT are
     applied appropriately.
parent 3ff38ffa
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment