I avoided allocating useless arrays for the result
Your benchmark is completely unrealistic, chalk & cheese comparison, and thus totally broken.
From perlfunc:
Benchmark code that doesn't actually produce the required result is broken. And broken, is just broken; of no value at all.
Obviously vec scales badly the sparser the distribution of values become...
Think again.
In reply to Re^5: Best method to diff very large array efficiently
by BrowserUk
in thread Best method to diff very large array efficiently
by newbieperlperson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |