3 ms·
> in "waste" that is fine, I'd categorise AmigaE's choice to read the entire source file into memory, instead of doing IO This is only an issue if your OS does
by zozbot234 3y ago
> in "waste" that is fine, I'd categorise AmigaE's choice to read the entire source file into memory, instead of doing IO
This is only an issue if your OS doesn't have virtual memory and mmap. Modern OS's automatically prefetch files into free RAM (so there's no such thing as "free RAM is wasted RAM" either). I think newer versions of Amiga OS were supposed to be getting virtual memory support at some point, too.
- vidarh 3y agoYes, but because it was an issue, even now decades later a lot of compilers still use file IO instead of just reading a file in one go even when you gain benefits (e.g. no "ungetting" or building a token buffer - just keep the index of the start and end). I'm guilty of that myself. It was an inspired choice, and about 30 years on it's still underutilized, on machines that typically have 3-4 orders of magnitude more RAM.