LWN.net Logo

OpenOffice.org 3.0 released

OpenOffice.org 3.0 released

Posted Oct 14, 2008 3:36 UTC (Tue) by efexis (guest, #26355)
In reply to: OpenOffice.org 3.0 released by cine
Parent article: OpenOffice.org 3.0 released

only the cells that actually is written something in exists in memory

Yes but they have to be addressed. A value of 0-1023 requires 10bits to address, and it's position can quickly and simply be resolved in just a few bytes of code. "Unlimited" requires scalable values, which means loops, conditional jumps, using memory rather than registers, everwhere the value is used (so a function the finds the left or rightmost cell of two or more cells becomes a lot more complex). Libraries like gmp do make doing this easier, but it's still nowhere as quick as a bit fixed width field where number of bits <= register size.

Alex


(Log in to post comments)

OpenOffice.org 3.0 released

Posted Oct 14, 2008 5:17 UTC (Tue) by k8to (subscriber, #15413) [Link]

That problem was solved long ago. Pre-written code exists to use the machine values until you overflow and then trap the processor exception and special case from there on out.

Even if that wasn't true, the cost of doing slightly more math to figure out what memory to pull in is trivial compared to the slowness of pulling it in. The only downside is consuming more memory in the addressing.

The ONLY downside? Ha!

Posted Oct 14, 2008 9:48 UTC (Tue) by khim (subscriber, #9252) [Link]

The REAL downside is neither speed nor complexity. The REAL downside is the need to rewrite millions of already existing code which is designed to use fixed width numbers. I presume 256=>1024 was just a change in #define plus some testing, "unlimited" will be HUGE undertaking...

OpenOffice.org 3.0 released

Posted Oct 14, 2008 10:40 UTC (Tue) by efexis (guest, #26355) [Link]

"Pre-written code exists to use the machine values until you overflow and then trap the processor exception and special case from there on out"

Yep, that's the conditional loop bit... you loop loading/comparing each byte/word at a time, until the condition (overflow) hits and says to stop. There might be prewritten code (like the gmp library I mentioned) but it's still orders of magnitude slower than what it would be for a fixed bit width. which can be aligned to fit many into cachelines etc.
This wouldn't just need to be resolved for loading cells in, but all reference pointers (think loop variables that iterate through cells updating them) would need to be as this too.
Quite how much noticable difference this makes on a modern processor though... couldn't say without some profiling info.

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds