https://deterministic.space/high-performance-rust.html мелочи оптимизации #rust но про
lto=fat не знал.Pascal’s Scribbles
Cheap tricks for high-performance Rust
So you’re writing Rust but it’s not fast enough?Even though you’re using cargo build --release?Here’s some small things you can do to increase the runtime speed of a Rust project– practically without changing any code!
https://github.com/flamegraph-rs/flamegraph профайлинг #rust с помощью флэймграфов как в хром девтулс, напоминает
GitHub
GitHub - flamegraph-rs/flamegraph: Easy flamegraphs for Rust projects and everything else, without Perl or pipes <3
Easy flamegraphs for Rust projects and everything else, without Perl or pipes <3 - flamegraph-rs/flamegraph
https://likebike.com/posts/How_To_Write_Fast_Rust_Code.html про профайлинг с
забавно, но
perf, эффективный код на #rustзабавно, но
indexing: When you use the index operator (a[i]) on an array/slice/Vec/etc., bounds checks are performed, and a panic can be raised. For most situations, if let + get() tends to outperform other indexing techniques (including the unsafe ones!) because it cannot panic and has excellent compiler optimization:думал что эта дурь с индексом
arr[i] работает лучше чем через let Some(el) = arr.get(i). а оказалось что наоборотну наконец ктото собрал это воедино https://rufflewind.com/img/rust-futures-cheatsheet.html #rust futures cheatsheet с ссылочками, удобненько
нарвался на прекраснейший блог Yoshua Wuyts (контрибьютер Tids) про #rust и про асинхронщину в нем там много
https://blog.yoshuawuyts.com/
чувствую много отсюда прочитаю в скором времени
https://blog.yoshuawuyts.com/
чувствую много отсюда прочитаю в скором времени
Yoshuawuyts
Yoshua Wuyts — Blog
про стэйтмашины в #rust. тот синтаксис который он предложил это чтото на подобии перегрузок для инамов. https://blog.yoshuawuyts.com/state-machines/
Yoshuawuyts
State Machines: Introduction
https://www.youtube.com/watch?v=_8-ht2AKyH4
неплохо для базового обьяснения stack/heap в C/C++
неплохо для базового обьяснения stack/heap в C/C++
YouTube
Pointers and dynamic memory - stack vs heap
See complete series on pointers here
http://www.youtube.com/playlist?list=PL2_aWCzGMAwLZp6LMUKI3cc7pgGsasm2_
In this lesson, we describe the concept of dynamic memory allocation in c or c++ and explained how memory is managed for an application. We have…
http://www.youtube.com/playlist?list=PL2_aWCzGMAwLZp6LMUKI3cc7pgGsasm2_
In this lesson, we describe the concept of dynamic memory allocation in c or c++ and explained how memory is managed for an application. We have…
https://www.youtube.com/watch?v=2IxQgXQl_Ws
ну впрочем тоже самое но для #rust , stack/heap ownership+borowwing
ну впрочем тоже самое но для #rust , stack/heap ownership+borowwing
YouTube
Rust Memory Management - Ownership and Borrowing
#Rust #TensorProgramming #OwnershipAndBorrowing
In this video we take a look at Rust's memory management model. That is the Ownership and Borrowing Model. We talk about the Stack and the Heap as well as Stack frames and pointers.
Source Code: https:…
In this video we take a look at Rust's memory management model. That is the Ownership and Borrowing Model. We talk about the Stack and the Heap as well as Stack frames and pointers.
Source Code: https:…
ну а тут уже чуть поглубже https://doc.rust-lang.org/1.22.0/book/first-edition/the-stack-and-the-heap.html stack/heap в #rust
https://www.youtube.com/playlist?list=PL7Y5Yox90r8M9yVblJ2ey_2RHo0frcUsX неплохой курс по основам #rust. все базовые понятия и структуры данных. хороший понятный английский
YouTube
Rust Programming Language - YouTube
https://www.youtube.com/playlist?list=PLVvjrrRCBy2JSHf9tGxGKJ-bYAN_uDCUL вот и еще один плэйлист по основам #rust. ютюб решил мне начать советовать их все =)
YouTube
RUST PROGRAMMING TUTORIALS
Follow this playlist to learn the basics of the Rust Programming Language.
AsRef и AsMut трэйты в #rust для упрощения кода. доку поправили, сейчас стало понятней
https://doc.rust-lang.org/std/convert/trait.AsMut.html
https://doc.rust-lang.org/std/convert/trait.AsRef.html
https://doc.rust-lang.org/std/convert/trait.AsMut.html
https://doc.rust-lang.org/std/convert/trait.AsRef.html
doc.rust-lang.org
AsMut in std::convert - Rust
Used to do a cheap mutable-to-mutable reference conversion.
Dynamic storage allocation: A survey and critical review. In (1995)
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.143.4688
достаточно глубокий обзор на динамическую аллокацию памяти, фрагментацию, алаймент тп
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.143.4688
достаточно глубокий обзор на динамическую аллокацию памяти, фрагментацию, алаймент тп
https://www.youtube.com/watch?v=skos4B5x7qE Zero-Cost Async IO #rust. достаточно простое описание и сравнение
YouTube
RustLatam 2019 - Without Boats: Zero-Cost Async IO
Boats is a member of the language design, library, and cargo teams of the Rust Project. They are Senior Research Engineer working on Rust for Mozilla Research. Contributing to Rust since 2014, they've done design work for significant language extensions like…
https://deterministic.space/secret-life-of-cows.html
статья про Cow в #rust. забавляет название "тайная жизнь коров" =)
статья про Cow в #rust. забавляет название "тайная жизнь коров" =)
Pascal’s Scribbles
The Secret Life of Cows
A lot of people at RustFest Paris mentioned Cows– which may be surprising if you’ve never seen std::borrow::Cow!
https://llogiq.github.io/2020/03/14/ootb.html прикольная техника резервирования места, и для этого не нужно боксить (ложить явно в хип) а можно сделать просто резервацию
let t_holder;
let opt_t = if has_t {
t_holder = get_t();
Some(&t_holder)
} else {
None
}
https://llogiq.github.io/2017/06/01/perf-pitfalls.html
#rust Performance Pitfalls
когда то нарвался на пару путктов отсюда
#rust Performance Pitfalls
когда то нарвался на пару путктов отсюда
собственно для стэйт машин хорошо подойдет замена прямо из памяти, что бы не аллоцировать лишний раз в промежуточную переменную https://github.com/rust-unofficial/patterns/blob/master/idioms/mem-replace.md
GitHub
patterns/mem-replace.md at main · rust-unofficial/patterns
A catalogue of Rust design patterns, anti-patterns and idioms - patterns/mem-replace.md at main · rust-unofficial/patterns
во. шикарная статья про оптимизацию кода коровами (как же меня забавляет этот тип =)) в #rust
https://oribenshir.github.io/afternoon_rusting/blog/copy-on-write
https://oribenshir.github.io/afternoon_rusting/blog/copy-on-write
oribenshir.github.io
Optimizations That Aren't, Or Are They?
This blog is designed to cover topics related to both Rust & C++ languages. This blog has emphasis on strong typing and design choices.
