3 ms·
> RAM is so big these days that most databases can fit into it and be blazingly fast. ... Compared to L3 cache? Isn't that still at least 10 times faster? Tha
by shrimp_emoji 4y ago
> RAM is so big these days that most databases can fit into it and be blazingly fast.
... Compared to L3 cache? Isn't that still at least 10 times faster?
That probably only matters in high performance projects though.
> the correct way to structure IF statements (Common case first etc)
But muh early returns on error D:
- tmtvl 4y agoAccording to Intel* RAM is about 2x L3 cache. Which is about 10x L2, which is about 4x L1. So: RAM := 1 L3 := 2 L2 := 20 L1 := 80 * https://www.intel.com/content/www/us/en/developer/articles/technical/memory-performance-in-a-nutshell.html https://www.intel.com/content/www/us/en/developer/articles/t...
- _aavaa_ 4y agoThat's latency, and it's for a 16 core. The bandwith is shown there to be at least 1/4.
- gonzo41 4y agoThe point I was making is that a trip to disk is generally not occurring, and that having a soup of pointers in RAM isn't as bad having badly laid out memory on disk that needs to be paged in. Most performance being lost, isn't from memory layout patterns and not getting full pages. It's not even that much from bad branch prediction. Most of the bad performance these days is the stacks of extra app layers that exists for little benefit.
- JanneVee 4y agoAnd I see comments saying that Casey is doing some strawman thing here and yet here you are with claim "1. No need". I'm just coming here with personal experience and my own anecdote that memory layout does matter even on modern CPU:s and it isn't niche. And because it was designed with OO mindset there wasn't any quick fix available.