3 ms·
True! That was just off the top of my head. I suppose you could imagine some kind of really smart dynamic analyzer which looks at the list length before startin
by uryga 8y ago
True! That was just off the top of my head. I suppose you could imagine some kind of really smart dynamic analyzer which looks at the list length before starting the reduce and goes "oh, I'm going to repeat this over 500 times, better JIT it now". In that case the 1000 element case could be faster. But I don't know much about JIT compilers/analyzers and this is just theoretical, so you're likely correct :)