Files
mruby-mruby/include/mruby
Yukihiro "Matz" Matsumoto 0fab703028 class.c: use linear search for method tables; make ROM entries const
Replace binary search with linear scan in mt_get(), mt_put(),
mt_del(), mt_chain_has(), and mrb_mt_foreach(). The method cache
makes repeated lookups O(1), so linear scan on cache misses is
acceptable.

This removes the sorting requirement, allowing ROM entry arrays
to be declared const. On embedded systems, const static data
resides in flash/ROM instead of RAM, saving ~8.4KB for ~700
method entries on 32-bit MCUs.

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-20 08:26:05 +09:00
..
2024-06-27 22:46:13 +02:00
2023-05-03 22:12:59 +10:00
2026-01-24 11:31:32 +09:00
2025-11-02 21:18:18 +09:00
2019-08-18 20:12:44 +09:00
2025-06-25 10:46:23 +10:00