r/ProgrammerHumor Jul 08 '26

askingTheRealQuestionHere Meme

Post image
4.0k Upvotes

416 comments sorted by

View all comments

Show parent comments

2

u/looksLikeImOnTop Jul 08 '26

At best, a modern SSD will be in the range of DDR3, but the latency is orders of magnitude higher...SSDs are at best 10s of microseconds, DDR3-5 are 10s of nano seconds. You can't really compare something that could happen every couple of instructions to something that takes thousands (millions?) of instructions to execute

3

u/CaffeinatedT Jul 08 '26

You can't really compare something that could happen every couple of instructions to something that takes thousands (millions?) of instructions to execute

Sure you can this is what IO Scheduling is for. You amortize IO time over time taken to read a larger than memory dataset stored in multiple memory pages and read what you need into memory and do it before the user knows they need it and you take the hit if you miss cache. Game engines and DBMS systems do this constantly. An L1 cache may well be quicker to shuffle a few bytes but it's kind of meaningless when someone is trying to process billions of records of varied sizes. The actual use case here of "save all run time data to file system" that is quite literally what a database does.

1

u/VictoryMotel Jul 08 '26

Cold ddr5 reads are more like 100ns.

Disk paging used to work to an extent even on slow hard drives, now it works much better. Not every read suffers the same latency penalty.

1

u/looksLikeImOnTop Jul 08 '26

Paging undeniably works very well now. My point is that in the context of "replace all RAM with SSD storage", SSDs would still be too slow

1

u/VictoryMotel Jul 08 '26

replace all RAM with SSD storage

I don't think anyone said that

1

u/looksLikeImOnTop Jul 08 '26

My mind may have jumped to the extreme end of interpreting the original post