3 ms·
The biggest problem is that map, filter make copies of the structure. That's an allocation, that means GC calls. You can make a similar function that changes
by pleoxy 3y ago
The biggest problem is that map, filter make copies of the structure. That's an allocation, that means GC calls.
You can make a similar function that changes the data in place and will be faster. But that comes with side effects which is not functional style.