On Thu, Dec 16, 2010 at 11:36 AM, David Nolen <dnolen.li...@gmail.com> wrote: > On Thu, Dec 16, 2010 at 11:18 AM, Ken Wesson <kwess...@gmail.com> wrote: >> >> On Thu, Dec 16, 2010 at 8:13 AM, Stuart Halloway >> <stuart.hallo...@gmail.com> wrote: >> >> Worse, from the sounds of it the new + isn't exactly the old >> >> unchecked-+; it still checks for overflow rather than allowing >> >> wrapping. That's going to add a compare-and-branch to every add >> >> instruction and halve the speed of those operators on typical >> >> hardware. Compare-and-throw-exception is hardly superior to >> >> compare-and-box-in-BigInteger, since it's still slow AND now some >> >> arithmetic code that used to work but be slow will now explode in your >> >> face. > > Hacker's Delight shows how the overflow check can be done w/ around 6-8% hit > on performance. Clojure implements that strategy.
The overflow check is the same whether you react to an overflow by boxing the result or react to an overflow by throwing an exception! > Arguments without any knowledge of the details seems fruitless. This reads like a personal criticism to me. And meanwhile you managed to entirely miss my point. -- 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