Details
-
Type:
Defect
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: Release 1.3
-
Component/s: None
-
Labels:None
-
Patch:Code
-
Approval:Ok
Description
[Updated: The new primitive support relies on a primitive bit-and operator. As one doesn't exist, clojure functions like even? are now using reflective calls and are about 150x slower than in Clojure 1.2)
JVM has a land instruction and java has & operator that works with longs.
public static long and(long, long);
Code:
0: lload_0
1: lload_2
2: land
3: lreturn
The attached patch allows Clojure to take advantage of it.
Converted from http://www.assembla.com/spaces/clojure/tickets/380
Attachments:
0001-Added-bit-and-with-long-parameters-and-overload-reso.patch - https://www.assembla.com/spaces/clojure/documents/dciMoWD8ir36WfeJe5cbLA/download/dciMoWD8ir36WfeJe5cbLA