You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So far we only run lodestar with NodejS. The goal is to experiment other javascript runtimes like Bun and Deno to see if lodestar performs better there. I had different benchmark for them:
Memory: as tested [here](url), Bun is very efficient to store a short Uint8Array of 32 bytes which is critical for our merkle tree. This could help unblock Reducing CachedBeaconState size #5857
Number of bytes used to store an Uint8Array of 32 bytes
to run the NodeJS, I used the tsx and it's worth to note by @nazarhussain that Typescript overhead is almost negligible in case of Bun, ~10% in case of Deno and 100% in case of TSX/TS-Node
Solution description
Based on the test results I'd like to discuss how to go from there
Bun is potentially to be a candidate javascript runtime that help boost lodestar's performance, do we need other tests for it?
For such comparisons we should avoid typescript complexity. I run it over the build JS files and got different results. But yet Bun is the winner.
Node: 9.1ms
Deno: 8.2
Bun: 3.71
One other observation is that Typescript overhead is almost negligible in case of Bun, ~10% in case of Deno and 100% in case of TSX/TS-Node
Looks like Bun's performance trumps Deno's by a substantial amount. Is there any advantage of Deno over Bun that we should consider?
@ensi321 I don't see any, as discussed in the previous meeting we want to explore Bun because its JavaScriptCore engine is way different from NodeJS + Deno. One obstacle for Bun is it does not support Node API, we should try Bun's FFI instead and compare the performance with Node API
Problem description
So far we only run lodestar with NodejS. The goal is to experiment other javascript runtimes like Bun and Deno to see if lodestar performs better there. I had different benchmark for them:
Number of bytes used to store an Uint8Array of 32 bytes
Here's my result on a Mac M1:
to run the NodeJS, I used the tsx and it's worth to note by @nazarhussain that Typescript overhead is almost negligible in case of Bun, ~10% in case of Deno and 100% in case of TSX/TS-Node
Solution description
Based on the test results I'd like to discuss how to go from there
Additional context
No response
The text was updated successfully, but these errors were encountered: