What (+ x y) compiles down is highly dependent on the surrounding context, including but not limited to the local type-hints and the value of *unchecked-math*. Actually verifying that it's calling the primitive, unboxed, easily inlined clojure.lang.Numbers.add(long, long) requires either a profiler or a decompiler.
For a lot of use cases, this doesn't matter. But where it does matter, it tends to turn into a mind-numbing cycle of adding type-hints, seeing whether that changed the compilation output, and then trying again. Since I've gone through this more times than I'd like to admit, I rolled my own: https://github.com/ztellman/primitive-math. This is not meant to be a replacement for Clojure's numeric tower, rather it's meant to supplement it when the range of possible inputs is intentionally narrow. I expect this should be immediately useful in a variety of applications and libraries. If anyone has questions, I'm happy to answer them. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.