Does checking the boundaries of a Rust array affect performance?

I come from C, and I wonder if Rust border checking affects performance. Probably, for each access, several additional assembly instructions are required, which can be harmful when processing a large amount of data.

On the other hand, expensive processor performance is memory, so more arithmetic assembler instructions may not hurt, but then it may be important that after loading the cache line, sequential access should be very fast.

Has anyone rated this?

+6
source share
1 answer

, . , , " ", . , .

, Vec, Rust, . - , , , , .

, , . ; -, , .

,, , . , , , , , .

, , , , , , , .

,, , . , ; . , , .

, ,, , , . , , SIMD 10.

, ,, .

, ,, . , .

. -, , , , , /. -, , , , .

, . , .

, Rust "" , , , ( , , ) . , , Rust .

+17

All Articles