mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
91727f38de
The original implementations used plain Ruby strings referenced from instance variable (`@buf`) as buffers. We replaced those buffers by C structure (`struct mrb_io_buf`) referenced directly from `fptr`. The result is significant improvement of both performance and memory consumption. Our simple benchmarks (reading `README.md` 10,000 times) runs 5+ times faster, and `mrbtest` test suites consumes 85% less memory. Recent changes on `mruby-io` is preparation for this improvement.