Clojure

Optimize /

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Declined
  • Affects Version/s: None
  • Fix Version/s: Backlog
  • Component/s: None
  • Labels:
    None

Description

Optimization to / such that the & more version expands to equivalent of (/ x (reduce * y more)) rather than (reduce / (/ x y) more). There should be an inlined variant of & more as well.

This was originally part of CLJ-184, but was pulled out because it's big enough to be its own ticket. The rationale is that multiplies are significantly faster than divides on the JVM, and n-ary calls to / could be faster.

See "Java Multiplication (Much) Faster than Division" for background and Java benchmarks.

Activity

Alan Dipert made changes -
Field Original Value New Value
Description Optimization to / such that the & more version expands to equivalent of (/ x (reduce * y more)) rather than (reduce / (/ x y) more). There should be an inlined & more as well.

This was originally part of #184, but was pulled out because it's big enough to be its own ticket. The rationale is that multiplies are significantly faster than divides on the JVM, and n-ary calls to / could be faster.
Optimization to / such that the {{& more}} version expands to equivalent of {{(/ x (reduce * y more))}} rather than {{(reduce / (/ x y) more)}}. There should be an inlined variant of {{& more}} as well.

This was originally part of #184, but was pulled out because it's big enough to be its own ticket. The rationale is that multiplies are significantly faster than divides on the JVM, and n-ary calls to / could be faster.
Alan Dipert made changes -
Description Optimization to / such that the {{& more}} version expands to equivalent of {{(/ x (reduce * y more))}} rather than {{(reduce / (/ x y) more)}}. There should be an inlined variant of {{& more}} as well.

This was originally part of #184, but was pulled out because it's big enough to be its own ticket. The rationale is that multiplies are significantly faster than divides on the JVM, and n-ary calls to / could be faster.
Optimization to / such that the {{& more}} version expands to equivalent of {{(/ x (reduce * y more))}} rather than {{(reduce / (/ x y) more)}}. There should be an inlined variant of {{& more}} as well.

This was originally part of #CLJ-184, but was pulled out because it's big enough to be its own ticket. The rationale is that multiplies are significantly faster than divides on the JVM, and n-ary calls to / could be faster.
Alan Dipert made changes -
Description Optimization to / such that the {{& more}} version expands to equivalent of {{(/ x (reduce * y more))}} rather than {{(reduce / (/ x y) more)}}. There should be an inlined variant of {{& more}} as well.

This was originally part of #CLJ-184, but was pulled out because it's big enough to be its own ticket. The rationale is that multiplies are significantly faster than divides on the JVM, and n-ary calls to / could be faster.
Optimization to / such that the {{& more}} version expands to equivalent of {{(/ x (reduce * y more))}} rather than {{(reduce / (/ x y) more)}}. There should be an inlined variant of {{& more}} as well.

This was originally part of CLJ-184, but was pulled out because it's big enough to be its own ticket. The rationale is that multiplies are significantly faster than divides on the JVM, and n-ary calls to / could be faster.

See ["Java Multiplication (Much) Faster than Division"|http://lingpipe-blog.com/2009/05/13/java-multiplication-faster-than-division-in-jdk-1-6/] for background and Java benchmarks.
Hide
Alan Dipert added a comment -

We don't want to mess with the semantics of division at the bottom.

Show
Alan Dipert added a comment - We don't want to mess with the semantics of division at the bottom.
Alan Dipert made changes -
Status Open [ 1 ] Closed [ 6 ]
Resolution Declined [ 2 ]

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: