
Benchmarking GPRC in Rust and Go - neximo64
https://medium.com/@Rustling_gopher/benchmarking-grpc-in-rust-go-184545e7688a
======
zRedShift
According to the reddit thread, the benchmarks were done on a pretty beefy
MBP.

The macOS malloc is known to perform poorly, so I wonder if it's possible to
narrow the gap just by using jemalloc, without any other optimisations.

    
    
      // Cargo.toml
      [dependencies]
      ...
      jemallocator = "0.3"
    
      // main.rs
      use jemallocator::Jemalloc;
      #[global_allocator]
      static GLOBAL: Jemalloc = Jemalloc;
    

If the issue is indeed repeated (de-)allocations, I would also like to see
Linux glibc/musl benchmarks. I expect musl malloc to perform even worse, so
many stories about allocation sensitive services performing horribly in
production because they're based on alpine images.

------
todotask
It would be ideal to indicate what hardware and OS platform is being tested
on. Ideally Linux and source code of your benchmark.

~~~
neximo64
(From
[https://old.reddit.com/r/rust/comments/hs5k36/benchmarking_g...](https://old.reddit.com/r/rust/comments/hs5k36/benchmarking_grpc_in_rust_and_go/))
Looks like the source code is provided in each project as the helloworld
greeting example.

------
neximo64
It's curious that Rust performed as node did. I thought surely it would be
better

