That last answer in the comment chain just asserts that this is the cost of autoboxing. It doesn't actually describe any measurements.
I think that is a made-up number. I find it very hard to imagine that it costs hundreds of microseconds to box or unbox an integer (0.5 s / 2000). On Wed, Jul 15, 2009 at 4:51 PM, Bryan Duxbury <[email protected]> wrote: > there is some cost for sure but I did not do a real benchmark. When I did >> search for it, I came across : >> http://stackoverflow.com/questions/423704/java-int-or-integer/423856 >> >> the last answer indicate that auboxing 2000 Integer add 0.5 ms... yes it's >> not much but if you are doing a lot of such operation it starts to adds up >> especially on a server side web apps/web services. >> > > Interesting. Would love to see if that measured up the same way in Thrift. -- Ted Dunning, CTO DeepDyve 111 West Evelyn Ave. Ste. 202 Sunnyvale, CA 94086 http://www.deepdyve.com 858-414-0013 (m) 408-773-0220 (fax)
