3 ms·
Rust can introduce some interesting performance issues when it comes to implicit Drop when leaving an object-in-memory's scope.
by heavyset_go 4y ago
Rust can introduce some interesting performance issues when it comes to implicit Drop when leaving an object-in-memory's scope.
- kibwen 4y agoThat's just RAII, and even if you were repeatedly allocating and dropping something large within a tight loop I think you'd have a hard time noticing compared to the overhead of Python interop. You could probably find a way to avoid those allocations, but that's intermediate-level optimization that can also be deferred to future work.
- heavyset_go 4y agoDefinitely, especially compared to Python. I bring it up because it can be counterintuitive when writing a naive solution from a managed language in something like Rust for performance reasons.