Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic memory allocation benchmark (#976)
## Summary This PR adds a binary called `memtest` to `qsc`, and a CI stage to interpret its output and post feedback on PRs. `memtest` will output the number of bytes used to compile some Q# code. Right now, it just compiles the standard library, but it is easily extensible if we want to use the `qsc` API to evaluate arbitrary Q# inputs (maybe all of the samples?). ## Some Notes I first used Jemalloc for this. After some iteration with Jemalloc, I realized it is overkill for what we need. Additionally, using Jemalloc breaks on Windows and uses C FFI under the hood. I looked for other options, and found that [you can implement your own allocator](https://doc.rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html#example). So I did that, instead. This new approach adds zero dependencies and is easier to reason about. Part 2 of this feature is here: #981
- Loading branch information