Forwarded from Блог*
#prog #rust #article
Очередная статья про обработку ошибок в Rust, да. Но полезная: ставит под сомнения и разбирает распространённые мнения об ошибках в Rust. В частности, разбирается совет "anyhow для приложений, thiserror для библиотек".
Очередная статья про обработку ошибок в Rust, да. Но полезная: ставит под сомнения и разбирает распространённые мнения об ошибках в Rust. В частности, разбирается совет "anyhow для приложений, thiserror для библиотек".
Unwoundstack
Rust Error Handling
Some thoughts on how to handle errors in Rust
Forwarded from Блог*
#prog #rust #article
How (and why) nextest uses tokio, part 1
Или хороший пример того, как async может пригодиться в программе, которая вообще никак не связана с общением по сети.
How (and why) nextest uses tokio, part 1
Или хороший пример того, как async может пригодиться в программе, которая вообще никак не связана с общением по сети.
How (and why) nextest uses tokio
How (and why) nextest uses tokio ꞏ sunshowers
How my open source test runner uses async Rust.
Forwarded from Блог*
#prog #rust #article
How much does Rust's bounds checking actually cost?
What is the actual cost of all this extra bounds checking, though? There’s a little bit of prior art here <...> On the other hand, I wasn’t able to find an extensive analysis of the cost of pervasive bounds checking on a real, large, production Rust codebase with high performance sensitivity. I happen to work on one of those, so I figured it might be interesting to take a look at the cost of bounds checks in the hot path.
TL;DR: выкидывание всех этих проверок — даже с использованием запатченного rustc, который не генерирует инструкции с проверками индексации (что вообще-то unsound) — не делает программу быстрее и даже может сделать несколько медленнее.
How much does Rust's bounds checking actually cost?
What is the actual cost of all this extra bounds checking, though? There’s a little bit of prior art here <...> On the other hand, I wasn’t able to find an extensive analysis of the cost of pervasive bounds checking on a real, large, production Rust codebase with high performance sensitivity. I happen to work on one of those, so I figured it might be interesting to take a look at the cost of bounds checks in the hot path.
TL;DR: выкидывание всех этих проверок — даже с использованием запатченного rustc, который не генерирует инструкции с проверками индексации (что вообще-то unsound) — не делает программу быстрее и даже может сделать несколько медленнее.
Readyset | Drop-in SQL Caching for PostgreSQL and MySQL
Increase the scale of your PostgreSQL and MySQL deployment by up to 100x with Readyset - all without modifying your application code or database. Start using Readyset today for free!