mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
ae4c952d2e
The Ruby version of `Array#rotate!` generated a rotated array and replaced the receiver, but the C version rotates the receiver array in-place. So the performance is improved a lot both in speed and memory consumption. Look for the comments in `array.c` for the in-place rotating algorithm, if you are interested.