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
    B

    bitsnbites

    bitsnbites.eu · Personal blog · on HN since 2011

    bitsnbites is a developer who writes about CPU design, instruction set density, benchmarks, SIMD, and compression, including his MRISC32 CPU.

    Visit blogRSSHN submissions
    Hardware & ElectronicsSystems & Performance
    What HN says

    HN links him in CISC vs RISC code density debates, though one commenter says his static-count metric is flawed. Others cite his OS benchmarks and JavaScript compression.

    Stats for nerds
    25HN people shared it
    18linked in comments
    445story points
    Mar 2025last shared
    2012people per year2025

    Top posts on HN

    1. 1
      Fundamental flaws of SIMD ISAs (2021)
      3 people · 210 points · first shared 2021 · 144 comments on HN
    2. 2
      The MRISC32 – A vector first CPU design
      2 people · 87 points · first shared 2018 · 18 comments on HN
    3. 3
      Benchmarking OS primitives
      7 people · 73 points · first shared 2018 · 52 comments on HN
    4. 4
      Compression of JavaScript programs
      2 people · 23 points · first shared 2011 · 6 comments on HN
    5. 5
      A tidy, linear Git history
      1 person · 22 points · first shared 2015 · 8 comments on HN
    6. 6
      Muon Baryon, an HTML5/WebGL demo in 6k JavaScript
      1 person · 12 points · first shared 2011 · 3 comments on HN
    7. 7
      Doing a sound synth in JavaScript
      1 person · 6 points · first shared 2014 · Discussion on HN
    8. 8
      Debunking CISC vs. RISC code density (2022)
      5 people · 4 points · first shared 2022 · 1 comments on HN
    9. 9
      Faster C++ builds – Bits'n'Bites
      1 person · 3 points · first shared 2018 · Discussion on HN
    10. 10
      IEEE 754 suggestion: A “core” subset
      1 person · 1 points · first shared 2020 · Discussion on HN

    What HN people wrote when they linked it

    • throwawaylinuxDec 2022

      Fork is actually very fast. Too funny a paper coming from Microsoft about fork/exec speed -

      https://www.bitsnbites.eu/benchmarking-os-primitives/

      Linux absolutely destroys the "proper" API. Nearly 40x faster at launching a program with fork+exec than Windows' CreateProcess. Not to mention the fact that vfork has always been available which is even faster.

      Fork is also pretty scalable, it requires no global locks. It is thread-safe, it has defined semantics in threaded programs and can be used to exec a process. And it isn't insecure, it does what is advertised, as securely as advertised.

      And close on exec is hardly a huge complication, it's actually a detail of exec(), not fork. It applies independently of exec, and you could make an exec that closes fds by default unless they're marked with a persist-on-exec flag. Library or runtime code can do this anyway really without any "huge complication". I don't know what you mean about SCM_RIGHTS interfering with fork, do you have something in mind? The problem would really be at the exec boundary, fork does not purport to alter any security attributes of the child or parent, so it really doesn't make sense to call it insecure. It doesn't suddenly get new rights, or have any limits enforced.

      I mean it is complicated stuff, but so is any process runtime environment that provides async notifications, threads, spawning, etc. Anybody who tells you they can make this simple and broadly usable is selling you snakeoil or a toy API.…

    • yebyenJun 2017

      It's really important in TDD to know that your test fails when the code you write for that feature it is missing. If it doesn't fail, that's a false positive. The prescribed pattern is, you write your test (it should be red), you write your code (it should turn green), you commit, push to CI, look at the rest of the tests, make sure none of them turned red... take another look at the code, refactor, commit, push to CI, look at tests again, and then start over on the next feature.

      (Edit: OK so reordering the commit is not actually the most important part, it's checking out that commit you reordered: with the code for the test, without the matching code for the implementation; and running the test to make sure that it fails until the feature is implemented.)

      I don't really care if you think it's cheating to reorder the commits, if it gets the job done faster / better in some way. I'm not writing code for a grade, I'm writing an application that I'll need to maintain later. If that feature breaks and that test doesn't turn red, it's been a complete waste of time writing it (and actually has provided negative value, because I will now be less inclined to test that behavior manually, knowing that there is a test and it passes.)

      That's a false positive that you can easily guard against by reordering the commits before squashing/merging everything back and confirming you see some red where it's expected. (You don't need to reorder if you did actually write the test before…

    • git-pullAug 2017

      No one's perfect with this stuff.

      If you don't believe me, clone git itself ($ git clone https://github.com/git/git) and open up the repo in tig(1)

      https://github.com/jonas/tig

      To be honest, I only in the past 2 years even bothered to view ($ git log --graph). Regardless of --graph getting wide now and then, I always visualize my git history as a straight line.

      Also, sometimes having a non-linear history is inevitable. Especially in large open source projects where you're pulling in patches to a branch, and patches on top of that. You're not always going to be merging a branch with a single author straight onto master.

      Despite posts like this (http://www.bitsnbites.eu/a-tidy-linear-git-history/) encouraging good git hygiene, I've had multiple open source projects merge in code via GitHub and never had negative consequence for it :P

      Maybe there are corner cases where git bisect wouldn't work? Though I never used git bisect even once. Most I do is scroll through tig and view diffs. Also used to play with a cool git plugin in vim (https://github.com/tpope/vim-fugitive).

      Also, GitHub has (since that linear git history post) introduced Rebase + Merge https://github.com/blog/2243-rebase-and-merge-pull-requests. I think that'll get you what you want.

      I do keep branches ("pull requests" if you're using GH lingo) up to date with ($ git pull --rebase). That does mean a force push ($ git push --force), but it's ok if it's your personal branch. I also use interactive mode ($…

    • mbitsnbitesJan 2024

      > The average A64 instruction does slightly less work than the average AMD64 instruction so the net result is that it makes sense to have slightly wider decoders

      I'm not sure that the difference is that big. A64 actually has quite powerful instructions, and some of them do more work than similar x86 instructions (madd and ubfx come to mind). In my testing A64 code often has fewer instructions than x86: https://www.bitsnbites.eu/cisc-vs-risc-code-density/

      > X86 CPUs don't quite use a "RISC-like encoding". The µops support RMW for memory, for example.

      I would love to learn more about that. Do you have any references? I was under the impression that internal instructions followed the load/store principle since I assume that the internal pipeline is a load/store pipeline?

      > The Power CPUs call it "cracking" when complicated instructions are split into simpler µops.

      Yes, it's the IBM term AFAIK. They call it cracking in zArch too. I also suapect that at least some ARMv8/9 implementations do cracking too (many AArch64 instructions have multiple results, which might be better handled as multiple internal instructions - I think it's partly a code density thing).

    • phireOct 2023

      It doesn't matter how optimised the length decoding is. Not doing it is still faster.

      For an 8-wide or 10-wide design, the propagation delays are getting too long to do it in all in single cycle. So you need the extra pipeline stage. The longer pipeline translates to more cycles wasted on branch mispredits.

      RISC-V code is only about 6-14% denser than Aarch64 [1], I'm really not sure the extra complexity is worth it. Especially since Aarch64 still ends up with a lower instruction count, so it will be faster whenever you are decode limited instead of icache limited.

      > Adding complexity to the I$ hasn't even made sense for x86 in two decades

      Hang on. Limiting the Icache to only 32bit aligned access actually simplifies it.

      And since the NUVIA core was originally an aarch64 core, why wouldn't they optimise for hardcoded 32bit alignment and get a slightly smaller Icache?

      [1] https://www.bitsnbites.eu/cisc-vs-risc-code-density/

    • IshKebabMar 2025

      > it also gives us better density overall by having smaller instructions. x86 can put more work into each instruction byte, so we can have denser binaries and increase performance that way.

      Is that really true? I was under the impression that ARM core density was better than x86.

      The first Google result I found agrees: https://www.bitsnbites.eu/cisc-vs-risc-code-density/

      > It may take a little bit more microarchitectural work for us to account for stronger memory order on the x86 side, but of course the software has to account for the weaker memory ordering on the ARM side. So there are tradeoffs.

      I don't think this makes sense either since software has to have synchronisation anyway. I don't think much software relies on x86 TSO (intentionally anyway; I'm sure many bugs are covered up by it).

      Anyway fantastic interview! Very refreshing when they're actually technical with interesting questions and answers.

    Related

    Arm Community Blogcommunity.arm.com147 people

    An update on GNU performance

    Arm Community Blog
    Company · last shared 2025
    Chad Austinchadaustin.me53 people

    I just wanted Emacs to look nice – Using 24-bit color in terminals

    Chad Austin
    Personal · last shared 2026
    Graham Jenkinsdarkcoding.net44 people

    Facebook’s code quality problem (2015)

    Graham Jenkins
    Personal · last shared 2025
    Dougall Johnsondougallj.wordpress.com48 people

    Why is Rosetta 2 fast?

    Dougall Johnson
    Personal · last shared 2026
    Trail of Bits Blogblog.trailofbits.com278 people

    RSA is a fragile cryptosystem

    Trail of Bits Blog
    Company · last shared 2026
    Bit Quabitbitquabit.com50 people

    Flux is the new WndProc

    Bit Quabit
    Personal · last shared 2025
    Random ASCIIrandomascii.wordpress.com274 people

    There are only four billion floats, so test them all (2014)

    Random ASCII
    Personal · last shared 2026
    Beets Blogbeets.io49 people

    We’re pretty happy with SQLite and not urgently interested in a fancier DBMS

    Beets Blog
    Company · last shared 2025