Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One of the most important reasons why we write programs, is because computers are slow and have limited memory. Computers only appear fast due to a host of tricks. The most important trick is the memory pyramid: with at the top a small number of very fast accessible memory (think CPU registers) and at the bottom a very fast but many orders of slower accessible memory (think the whole of the internet). And a lot of business is about moving data up and down the pyramid.

It looks like most software engineers are still unaware of this. Why do we still encode Unicode strings as UTF-8 strings in memory, why not as double linked of Code points? Not because we cannot, but because it is faster and uses less memory.

Another big problem is related to multi-user modifications of shared data structures and that high-level semantic modelling is hard for most people. If multiple agents (people) are modifying a data structure, then those changes need to be combined in a semantic correct way. A complication factor is the fact that most data structures are distributed (also due to the memory pyramid) and that a lot of effort is needed to synchronize modifications.



What makes a double-linked list better?


The double-linked list was just an example. Could also have been any other list container for Unicode code points, where each code point uses a fixed size of memory (at least 21 bits). You might even use a data structures where a 'base' character with (optional) combining characters are treated as a single unit, because for many operations they should be treated as a unit.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: