Re: Draft of Binary module

> implementor’s perspective, I believe it should usually be possible
> to find memory-saving optimizations for both variants; but it would be
> interesting to hear more about other implementations.
>
> Saxon implements xs:integer (and all its subtypes) using an object that
> wraps a java long if it fits in a long, or a java BigInteger if not. Sure,
> there are representations that would be smaller and faster, but I don't
> think that making savings on the way we handle integers has ever been on
> anyone's critical path.

I suppose its only on my critical path because we have users playing
with very large binary values from XQuery and I have seen what can go
wrong if you allocate just a few more bytes than you need for every
byte in the source file.

> Of course, for the integer sequence that results from binary-to-octets, we
> would not materialize the integers eagerly.
>
> In Saxon-CE we use java BigDecimal throughout. Makes everything much
> simpler.
>
> Michael Kay
> Saxonica
>



-- 
Adam Retter

eXist Developer
{ United Kingdom }
adam@exist-db.org
irc://irc.freenode.net/existdb

Received on Thursday, 14 March 2013 11:47:47 UTC