~/talk

Benchmarking and Optimization of Rust Libraries

Talkat RustConf 2018 · on Friday, 2018-08-17· [rust, web-performance]
slides:none on file

Uses cargo bench and benchcmp plus criterion to get reproducible results and statistics, notes cargo bench is nightly only. Shows Postgres numeric serialization via string conversion at ~15,000 ns versus a math-based scaling loop at ~5,000 ns for a 3x speedup. Demonstrates fixed-size slices and inlining cut 3 ns→2 ns and loop times ~3700 ns→2100 ns. Optimizes division from naive 18 ns for small inputs to consistent ~42–46 ns for all sizes, finds copy (≈2900 ns) slower than borrow (≈2400 ns), and observes unsafe shows no benefit in tested cases.

AI-written summary · about

  1. 0:00Intro
  2. 0:59New Zealand Accent 101
  3. 1:42Growing Ecosystem
  4. 2:45Micro vs Macro benchmarking
  5. 10:52Obtaining realistic workloads
  6. 12:02Back to fundamentals
  7. 12:29Ex: PostgreSQL write performance
  8. 12:56E.g. storing the number 3.14
  9. 13:40Base-10 Implementation
  10. 14:48Math implementation
  11. 16:15Performance of math calculations
  12. 20:24Representing a decimal
  13. 22:32Exploiting fixed size primitive types
  14. 25:48Copying vs Borrowing
  15. 27:19What about unsafe?
  16. 28:51Closing Thoughts
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.