What about using ByteBuffer on top of a binary blob?  Doesn't that
meet your requirements for a list-like array wrapper?

I'm sure that's possible but as I understand it this would mean specifying a type of binary rather than eg list<double>. Additional complexity in the Java code aside, this would also infect the code of other languages we're interfacing with.

From my point of view at least, finding a workaround with Thrift is a bit
of a moot point anyway since we already have a solution in place. I really just wanted to chip in and point out the problem is real, and for some cases a very significant one.

Looking at the bigger picture, I've been hoping for a long time now that there would be some progress in supporting XOPs in the VM (see http://blogs.oracle.com/jrose/entry/fixnums_in_the_vm for a discussion). This would greatly reduce the overhead of many boxed primitive operations, and would mean libraries like Thrift wouldn't generally need to consider trading off usability with performance.



Reply via email to