Suggestion on the destination machine
I see two kinds of machines that the the renderer could run on: a small machine (like a phone) which is used to render a small amount of text; an large machine (like a modern PC) which is used to author a book.
On the large machine, the goal is speed, and there is a lot of memory available. So we should use sparse arrays (possibly 64-bit), and look to cache repeated patterns. double should be used since this is faster (and better) than float.
On the small machine, the issue is more memory footprint, and the amount of text being rendered is much less. So we should use hash-tables, not be too bothered about caching and use float.
RE: Suggestion on the destination machine - Added by Martin Hosken almost 3 years ago
Actually, for a large document, it's not so much that the segments are any bigger but that there are more of them.
Yes, for a large machine we want speed and for a small machine we want low memory footprint. To this end, we intend to use caching on the large machine to help speed things up. See the section on sub-segments. The aim here is to break a string down into smaller segments that have been cached and then reassemble a full segment from that, hopefully much more quickly. For a small machine we would just not cache or reduce their sizes.
The core engine, therefore is being designed for a small memory footprint, at least what is stored in the resulting segment. Even for large machines, memory is an issue. We could use doubles on a large machine, but since no other graphics engine does (cairo uses floats, many use int32) we probably don't need to worry. We haven't seen problems with floats.