Boxed types and constat propagation

Mark Roos mroos at roos.com
Sat Apr 21 16:10:42 PDT 2012


>From Kohsuke Kawaguchi email

 - How do other language implementers cope with this?

We are doing a Smalltalk implementation and have seen that the handling of
'boxed' integers is a possible performance issue.  I say possible because 
while
it is an obvious issue for integer intensive operations ( like Hanoi ) our 
large
scale benchmarks run at a similar speed to  the native versions.

The larger issue in our use of boxed integers ( boxed in our own wrapper) 
is the
object creation and collection overhead.  For instance indexing over a 
million element
array involves creating and discarding a million integers.  Currently we 
use a cache
plus a mutable integer approach to minimize this but I have yet to really 
benchmark its
performance.

The solution to this may lie in FixNums ( ints encoded in pointers ) but 
that is some time
off and may not be of a form useful to us. 

regards 
mark



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20120421/239ab175/attachment.html 


More information about the mlvm-dev mailing list