On Tue, Apr 29, 2008 at 5:36 PM, Jochen Theodorou <[EMAIL PROTECTED]> wrote:

>  I wanted to collect a bit data to how you avoid boxing in your language
>  implementations.

My language provides bignums and flonums, which I simply represent as
BigIntegers and Doubles. I pay the boxing penalty, but the
combinatorial explosion isn't too bad (only 4 cases to deal with).   I
worry about converting to and from Byte, Short, Int, Long, and Float
objects only when communicating with native Java methods.

My measurements show that the cost of using BigIntegers for numbers
representable by Integers is only about 2.5 times in the worst case (a
tight loop multiplying numbers), which I don't worry about -- the
mathematical tractability of BigIntegers is a huge win.

-- 
GMail doesn't have rotating .sigs, but you can see mine at
http://www.ccil.org/~cowan/signatures

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to