On Thu, Jan 13, 2011 at 7:28 PM, Stuart Sierra <the.stuart.sie...@gmail.com> wrote: > The goal of primitive math is better performance in the common case.
Of course, this better performance is not needed "in the common case", IMO, but only in hotspots that do number crunching, where people already optimize using primitive locals, coercion, and unchecked-foo. > The implementation makes the assumptions that Java long is big enough for > nearly all cases It also makes the assumption that the Java long is as fast as native arithmetic. Which, on a lot of 32-bit hardware, it won't be. > and that auto-promotion to BigInteger (and the resulting performance hit) is > rarely desirable. Debatable. I, for one, prefer to have unadorned arithmetic be correct at the expense of a little speed, while still having a way to get the speed in performance-critical parts of my code. -- 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