# Performance comparison

**URL:** <https://users.rust-lang.org/t/performance-comparison/56041>\
**Category:** help\
**Created:** [February 23, 2021, 5:55pm UTC](https://users.rust-lang.org/t/performance-comparison/56041 "2021-02-23T17:55:26Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![H2CO3](https://avatars.discourse-cdn.com/v4/letter/h/b5ac83/32.png) [@H2CO3](https://users.rust-lang.org/u/H2CO3)\
**Post date:** [February 23, 2021, 6:01pm UTC](https://users.rust-lang.org/t/performance-comparison/56041/2 "2021-02-23T18:01:15Z")

</div>

Are you compiling both pieces of code with optimizations enabled? (E.g. `-O2 -flto` for C++ and `cargo build --release` for Rust.)

---

_[View the full topic](https://users.rust-lang.org/t/performance-comparison/56041)._
