Files
mruby-mruby/mrbgems
Yukihiro "Matz" Matsumoto ea5de2b8da mruby-array-ext: implement Array#& in C for better performance
Moved Array#& (set intersection) implementation from Ruby to C to improve
memory usage and performance. The C implementation uses hash-based
deduplication for large arrays (>16 elements) and linear search for
smaller arrays, following the same hybrid pattern as Array#| and Array#-.

Key improvements:
- Hash-based approach uses mrb_hash_delete_key() for proper deduplication
- Linear search approach checks result array to ensure uniqueness
- Maintains order preservation from the first array
- Eliminates temporary object creation in Ruby implementation

Added comprehensive test coverage for both small and large array scenarios,
including edge cases like no intersection, complete intersection, and
duplicate handling.

Co-authored-by: Atlassian Rovo Dev
2025-06-28 01:33:04 +09:00
..
2025-06-08 17:00:07 +09:00
2025-06-08 17:04:05 +09:00
2025-06-09 17:14:02 +09:00
2025-06-09 17:13:20 +09:00
2025-06-11 18:31:52 +09:00
2025-06-08 17:02:55 +09:00
2025-06-16 12:45:18 +09:00
2025-06-14 01:02:52 +09:00
2024-09-24 00:14:24 +10:00