On Fri, Jul 29, 2011 at 2:36 AM, Meikel Brandmeyer (kotarak) <m...@kotka.de> wrote: > Hi, > > Am Freitag, 29. Juli 2011 08:24:54 UTC+2 schrieb Ken Wesson: >> >> Er, "fast" would be for primitive integer arithmetic to wrap rather >> than throw an exception or auto-promote. Both of the latter behaviors >> require every math op to be accompanied by a test of some sort and a >> branch (to either the exception-throwing code or the BigInt >> constructing code). > > The exception throwing check is much faster than boxing each and every > number (Java can only do primitive return or Object, so you have to box > everything on return.) > > If you want "really fast", there is the unchecked-math flag or the > unchecked-* operations. > > You have "really fast, unsafe" -> "fast, safe" -> "slow, safe". Clojure > chose the middle path. No one prevents you from deviating to the left or the > right via unchecked-* or *'.
Yes. I felt the other post may have been unintentionally misleading, by implying that checking and maybe throwing an exception was the fastest path. -- Protege: What is this seething mass of parentheses?! Master: Your father's Lisp REPL. This is the language of a true hacker. Not as clumsy or random as C++; a language for a more civilized age. -- 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