Hacker News new | past | comments | ask | show | jobs | submit login

It is ridiculous, yet a linked list of integers is not equivalent to 100K of text in a word processor.

That 100K of text in a word processor has a context. For example, people expect word processing documents to be paginated. Pagination implies an understanding of how the entire document is formatted. There is also an expectation to be able to position the cursor or select text with a mouse, which means the software has to have more detailed information about how the visible portion of the document is formatted to map screen coordinates to characters. Then there is the memory used to render the visible portion of the document. If you're optimizing for speed instead of memory (which probably explains part of the difference from Word 95 and Word 365), all of that context is going to add up to a significant chunk of memory.

In contrast, that linked list of integers has no context. It is simply a data structure where we have no idea of how the surrounding code will impact memory usage. Well, we could probably make a few guesses based upon the data structure being used. Nodes are most likely added or removed from the head or the tail of the list, and any traversal of the list is likely to be done in a single direction. That's enough to suggest that it isn't being used in a word processor.

Heck, even the data types being compared is problematic. 100k of text implies 100,000 characters. If each character is stored as a byte and each pointer as 4 bytes, that 100k of text is now 500k in a linked list (make that 900k on 64 bit systems). If you're using UTF-16, which is likely for Word, that becomes 600k and 1M.

Any word processor that takes a naive approach or is optimized for performance instead of memory is going to consume a lot of memory.




I enjoyed reading what you posted but I think the fact that most people use 365 Word for the same reasons as '95 Word, means there is no usecase-guided optimisations by microsoft. I find that 95 Word runs faster on W95 than 365 Word runs faster on Windows 11.


You're not wrong, but you're missing a pretty fundamental point here, which is that all of the features you listed have been around since before computers measured things in gigabytes.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: