Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    E

    Emil Ernerfeldt

    ilikebigbits.com · Personal blog · on HN since 2015

    Emil Ernerfeldt writes about performance, optimization, and low-level programming, including hash tables and memory access.

    Visit blogHN submissions
    Systems & PerformanceProgrammingHardware & Electronics
    What HN says

    HN mostly links his "Myth of RAM" essay, which argues memory access time grows with the square root of data size, and commenters find it insightful.

    Stats for nerds
    53HN people shared it
    36linked in comments
    1.2Kstory points
    Mar 2026last shared
    2016people per year2026

    Top posts on HN

    1. 1
      The Myth of RAM (2014)
      8 people · 598 points · first shared 2015 · 277 comments on HN
    2. 2
      Programming in 1969: An interview with a pioneer – my mum
      5 people · 375 points · first shared 2019 · 68 comments on HN
    3. 3
      Simple coroutines for games in C++
      1 person · 93 points · first shared 2016 · 35 comments on HN
    4. 4
      Designing a fast hash table
      3 people · 69 points · first shared 2016 · 34 comments on HN
    5. 5
      The Unfixable Bug
      3 people · 37 points · first shared 2016 · 3 comments on HN
    6. 6
      Error Context – a stack trace for data
      1 person · 25 points · first shared 2016 · 1 comments on HN
    7. 7
      The Myth of RAM (2014)
      18 people · 13 points · first shared 2018 · 1 comments on HN
    8. 8
      The fastest code is the code that never runs: adventures in optimization
      4 people · 11 points · first shared 2015 · Discussion on HN
    9. 9
      Float or double?
      3 people · 5 points · first shared 2017 · 1 comments on HN
    10. 10
      The Myth of RAM: Part III
      1 person · 3 points · first shared 2015 · Discussion on HN

    What HN people wrote when they linked it

    • arnioxuxAug 2017

      There's an interesting argument based on physics on why memory access is O(sqrt(N)):

      http://www.ilikebigbits.com/blog/2014/4/21/the-myth-of-ram-part-i

      Relevant quote:

      > The amount of information that can fit within a sphere with radius r can be calculated using the Bekenstein bound, which says that the amount of information that can be contained by a sphere is directly proportional to the radius and mass: N ∝ r·m. So how massive can a sphere get? Well, what is the most dense thing in existence? A black hole! It turns out that the mass of a black hole is directly proportional to its radius: m ∝ r. This means that the amount of information that can fit inside a sphere of radius r is N ∝ r². And so we come to the conclusion that the amount of information contained in a sphere is bounded by the area of that sphere - not the volume!

      > In short: if you try to squeeze too much L1 cache onto your CPU it will eventually collapse into a black hole, and that would make it awkward to get the results of the computation back to the user.

      But honestly I find all of these arguments equally pedantic.

      People often forget Big Oh is a tool just like any other tool. It's useful for estimating number of X, whether X is cpu instructions, cache miss, disk read or whatever. When it stops being a good estimate (whether it's because your real world N is too small for growth rate to dominate, or stuff you're counting are not unit-cost comparable, or you're not even counting the right things in…

    • wahernMay 2024

      No answer is complete without getting into fundamental physics, information theory, and blackholes: https://www.ilikebigbits.com/2014_04_21_myth_of_ram_1.html

      TL;DR: Time complexity of memory access scales O(√N), not O(1), where N is your data set size. This applies even without hitting theoretical information density limits, whatever your best process size and latency. For optimal performance on any particular task you'll always need to consider locality of your working data set, i.e. memory hierarchy, caching, etc. And to be clear, the implication is that temporal and spatial locality are fundamentally related.

      Yes, some cache levels have lower intrinsic latency than others, but at scale (even at-home, DIY, toy project scales these days) it's simpler to think of that as a consequence of space-time physics, not a property of manufacturing processes, packaging techniques, or algorithms. This is liberating in the sense that you can predict and design against both today's and tomorrow's systems without fixating on specific technology or benchmarks.

    • deathanatosMar 2019

      There was a decent article exploring the timing between memory accesses, and when they started taking longer b/c you hit L2 cache, L3 cache, main RAM, swap, etc., and eventually showed how if you really graphed the access times, the overarching "curve" they followed was square/cube root¹; that is, real world hardware obeys the laws of physics.

      My googling dug up [1], but I'm not sure if that's it or not.

      My university schooling was pretty straightforward about memory access not being O(1). We also went over adding two numbers together (also not O(1)), but these are just generally elided for brevity's sake; I don't think most of us want to start worrying/optimizing for CPU caches prior to it being a thing that perf testing says we need to worry about.

      > 16/32 bit pointers for small arrays?

      It's not about the size of the array, it's about the location in memory. If you're storing an index, then sure, knock yourself out.

      [1]: http://www.ilikebigbits.com/2014_04_21_myth_of_ram_1.html

      ¹I'm a software engineer, not a physicist.

    • weberc2May 2017

      > https://johnresig.com/blog/web-workers/

      Sorry, I should have said "JS doesn't support shared memory parallelism for all intents and purposes, so memory sharing concerns are a moot point".

      > https://softwareengineering.stackexchange.com/questions/2455...

      This supports my point; not sure why you're posting this...

      > http://www.ilikebigbits.com/blog/2015/12/6/the-fastest-code-...

      This is also congruent with my points; if this is meant to be contradiction, you'll have to clarify.

      > http://www.ilikebigbits.com/blog/2015/12/6/the-fastest-code-...

      I'm not spending any more of my time skimming these mysterious links; this is a very straightforward question and you've evaded it several times and then referred me to an 8 kiloword document. What gives?

    • pimterryAug 2016

      No, it will never level off.

      You'll always eventually expand past the limits of whatever storage you're using. It's clearly impossible to build totally unlimited storage with constant access time, and you'll always eventually need larger storage (to disk, to other machines, to other data centres, etc), at the cost of speed.

      Take a look at [part two](http://www.ilikebigbits.com/blog/2014/4/28/the-myth-of-ram-part-ii), where he runs through this in more concrete depth to back his claims up. The theoretical physical limit for accessing N bits of data is O(sqrt(n)), no matter how you do it, just from the speed of light.

      It's counter-intuitive, but this really is true in the general case, not only in the regions shown on that graph.

    • hacker_9May 2017

      > JS is not parallelized

      https://johnresig.com/blog/web-workers/

      https://ponyfoo.com/articles/understanding-javascript-async-await

      > Python is also compiled to a bytecode before interpretation; were still don't call it a compiled language.

      https://softwareengineering.stackexchange.com/questions/24558/is-python-interpreted-or-compiled

      > macros aren't significantly faster

      > you can always precompile your abstraction on program load at the expense of slower start times

      http://www.ilikebigbits.com/blog/2015/12/6/the-fastest-code-is-the-code-that-never-runs

      > How can I ask it what type a function returns or what types it's arguments should take?

      http://www.braveclojure.com/core-functions-in-depth/

    Related

    Probably Danceprobablydance.com74 people

    Fibonacci Hashing: The Optimization That the World Forgot

    Probably Dance
    Personal · last shared 2026
    Martin Ankerlmartin.ankerl.com27 people

    Comprehensive C++ Hashmap Benchmarks 2022

    Martin Ankerl
    Personal · last shared 2026
    Davin McCalldavmac.wordpress.com16 people

    Why do we keep building rotten foundations?

    Davin McCall
    Personal · last shared 2023
    IT Hareithare.com80 people

    Operation Costs in CPU Clock Cycles

    IT Hare
    Personal · last shared 2026
    beza1e1beza1e1.tuxen.de120 people

    A collection of things that are Turing-complete by accident (2013)

    beza1e1
    Personal · last shared 2026
    The Erlangelisttheerlangelist.com36 people

    Why Elixir (2014)

    The Erlangelist
    Personal · last shared 2026
    Tom Moertelblog.moertel.com63 people

    A Great Old-Timey Game-Programming Hack

    Tom Moertel
    Personal · last shared 2026
    fasterthanli.mefasterthanli.me236 people

    A half-hour to learn Rust

    fasterthanli.me
    Personal · last shared 2026