2 ms·
That'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 t
by kibwen 4y ago
That'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.