Nov 10, 2025
I tried to settle down which React Native module system is the fastest but I used an existing micro benchmark. However there is so much subtlety that ended up proving nothing :)
(Micro) Benchmarks should always be taken as a **rough** relative measurement because they can be deceptive
An overview:
- On relative terms (and for this super specific micro benchmark): with a C++ TurboModule, C++ NitroModule or a Craby Module (which is basically a C++ turbo module that calls a Rust function) they are all the same. If you want the absolute fastest, then avoiding all the other module systems can be the fastest (⬇︎). This is what I call Pure Module: a jsi::Function exposed to JS, as bare JSI as it gets
- That being said, there seems to be some variability depending on which code runs first/last (in this test bench). If I shuffle the JS calls, I get slightly different results but nothing that changes the big picture. I also got a different number running on a pure React Native app and not an Expo app. There the Pure Module ran in 2.9ms smoking the rest.
- There are so many other factors to consider. I had to update this test bench app. Updating the Nitro Module was pain. Creating the Pure Module was work (as usual). The Turbo, Expo and Crabby just worked.
- The original test bench pitted a Swift Nitro Module against pure C++ implementations which is not really fair? IMO. Even then Swift Nitro Module was still on the same ballpark which is still impressive
- Even if an Expo Module looks slow AF, which app calls a single function 100_000 times in a row? The difference in real world usage for a single call might be nano or pico seconds, real world nothing. The only case where this WILL make a difference is in particular scenarios, like converting a big amount of native objects to JS (in e.g. a big sqlite query result), in which Nitro/CxxTurbo/PureModule will make a difference.
- One good point to mention is that Nitro Modules are the absolute fastest to call Swift/Kotlin code. If that's what you need. But this is kinda super specific to use cases... for sqlite you will need C++, what heavy computation/access to native Swift would require it... image processing like VisionCamera shows, and other hyper specific use cases
-I was thinking maybe measuring how long this would take in pure swift but maybe the compiler will optimize the for loop away 🤷♂️
I was thinking maybe creating a more real life scenario with sqlite but tbh... it will make mostly no difference. The orders of magnitudes of speed will be roughly the same. Tbh, at this point, use whatever you find easiest to work with. Unless you really start hitting a bottleneck it will matter little, mostly the DX is what matters.
View post