summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-05-14 10:51:38 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-05-15 17:26:36 +0900
commitae4c952d2ebf73fb24688097c9e675b0d07b3cd7 (patch)
tree5bf2cafeb570a11949992e0eb8505dddb55fd10d /src/string.c
parent9422fdbc87cc5310d7f0d5b1b9039fae1b6aa425 (diff)
downloadmruby-ae4c952d2ebf73fb24688097c9e675b0d07b3cd7.tar.gz
mruby-ae4c952d2ebf73fb24688097c9e675b0d07b3cd7.zip
mruby-array-ext/array.c: implement `Array#rotate` in C.
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.
Diffstat (limited to 'src/string.c')
0 files changed, 0 insertions, 0 deletions