Apr 11, 2020
I've found myself wondering quite a bit, which of these code-bits are the fastest? So I came to the conclusion, to benchmark it.
So, I've put up the a benchmark tool at https://hasty-back.madco.me/bench simply post some code to it, and it'll take care of the benching, will take ~3 seconds to get a response back, so that's not too long. 😇
If, by any chance, you have no idea, on which code to test, here's a snippet.
"global": "const data = [ ...new Array(1000).keys() ]",
"code": "data.find(x => x == 800)"
"code": "data.filter(x => x == 800)"
It'll figure which is faster, find vs. filter! Which one do you think?
This is a screendump of how to make a request within postman
Well take a test and figure it out! Thanks!