This Month in Mun - March 2020
A lot of things that we cannot fully control are currently going on in the world. The Mun community and Core Team are trying to make the best of the situation and have once again made great strides; the recently obtained MOSS grant giving us an additional productivity boost!Community
Our community has made great progress on the integration of the annotate-snippets crate. Hopefully we will be able to merge their PR soon.
We have added new good first issues on Github, so if you want to get involved with Mun please check them out:
- Replace return type annotation : with -> [issue#105]
- Implement slab allocator to store ObjectInfo<T> [issue#106]
- feat: add type aliases [issue#110]
We still had two major features left on our v0.2 roadmap: garbage collection and struct hot reloading. This month we were able to finish the former and started on foundational work for the latter; with a projected release date of Mun v0.2 by early May:
Our unceasing efforts to improve code coverage have resulted in several PRs focussed on new tests (and consequent fixes) - including our 100th PR!! 🎉
- Replace grcov with tarpaulin for test coverage [PR#100]
- fix(code_gen): incremental compilation [PR#101]
- test(code_gen): add incremental compilation test [PR#102]
- fix: name of type table global [PR#108]
We are always trying to improve metrics for objectively tracking quality as we progress. We’ve previously talked about how unit and integration tests are a big part of our development process. This month we’ve added performance benchmarks using Criterion, allowing us to do our first optimisations in the Mun Runtime.
The violin plot above compares function invocation overhead of embedded languages (Mun, LuaJIT, Wasm) with the raw performance of Rust by invoking an empty function that merely returns the input argument. The Wasmer runtime was used to execute Wasm.
Please note that Rust takes around 675 ps and is thus not visible on the above scale. For clarity, below you can see the respective PDFs of function call times in order of speed (less is better); i.e. for Rust, Mun, Wasm, LuaJIT (from left to right, top to bottom).
To test arithmetic and logic performance, we needed to minimise the function invocation overhead; enter Fibonacci. The line chart below shows the mean measured time for each language as the input argument increases (100, 200, 500, 1000, 4000, 8000). Even at this early stage, Mun’s dependence on LLVM as compiler backend allows us to achieve performance comparable to Rust.
All benchmarks were run on an Intel(R) Core(TM) i7-6700HQ CPU @ 2.6 GHz with 16 GB DDR4 RAM.
The benchmark source code is included with the Mun repository. Feel free to give it a try, add additional benchmarks, and share your findings with us on Discord, Twitter, or Github.
Last but not least, some miscellaneous quality of life improvements were also merged: