RustTokioBenchmark
Bannerlord.CSharp.Scripting
RustTokioBenchmark | Bannerlord.CSharp.Scripting | |
---|---|---|
1 | 2 | |
0 | 14 | |
- | - | |
2.7 | 0.0 | |
about 2 months ago | almost 2 years ago | |
Rust | C# | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
RustTokioBenchmark
-
3 years of fulltime Rust game development, and why we're leaving Rust behind
> If you ever pull up a debugger and step through an async Rust/tokio codebase, you'll get a good sense for what the overhead here we're talking about is.
So I didn't quite do that, but the overhead was interesting to me anyway, and as I was unable to find existing benchmarks (surely they exist?), I instructed computer to create one for me: https://github.com/eras/RustTokioBenchmark
On this wee laptop the numbers are 532 vs 6381 cpu cycles when sending a message (one way) from one async thread to another (tokio) or one kernel thread to another (std::mpsc), when limited to one CPU. (It's limited to one CPU as rdtscp numbers are not comparable between different CPUs; I suppose pinning both threads to their own CPUs and actually measuring end-to-end delay would solve that, but this is what I have now.)
So this was eye-opening to me, as I expected tokio to be even faster! But still, it's 10x as fast as the thread-based method.. Straight up callback would still be a lot faster, of course, but it will affect the way you structure your code.
Improvements to methodology accepted via pull requests :).
Bannerlord.CSharp.Scripting
-
3 years of fulltime Rust game development, and why we're leaving Rust behind
And yet the fact that Bannerlord game logic is entirely in C# makes this possible:
https://github.com/int19h/Bannerlord.CSharp.Scripting
which in turn makes it a lot easier and more convenient to mod. Try that with Rust...
-
Mod Monday
See the documentation and examples at https://github.com/int19h/Bannerlord.CSharp.Scripting.