DEV Community 👩‍💻👨‍💻

Discussion on: Flattening an Array, a Performance Test

Collapse
 
ryan_dunton profile image
Ryan Dunton Author

I updated the test suite to take in the spread operator and flat() tests, but it didn't seem to be marketly faster than the others, actually flat seems like it is the slowest so far. You can see the results here.

I actually hadn't heard of the flat() function until you mentioned it. I had trouble getting it to work in my local node environment but was able to work it in Chrome. Not sure why.

Collapse
 
rhymes profile image
rhymes

I actually hadn't heard of the flat() function until you mentioned it. I had trouble getting it to work in my local node environment but was able to work it in Chrome. Not sure why.

It's not supported by Node :D

Thanks for the updated info!