~/talk

How to Sort Your Socks Using JavaScript

TalkinSpanishat NodeConf Argentina 2017 · on Saturday, 2017-10-28· [javascript]

Provides working JavaScript implementations of insertion sort, merge sort and quicksort (including extending Array.prototype), and runs in-browser benchmarks on a Mac Chrome build. Reports that insertion sort outperforms the native Array.sort for very small arrays (tests up to 100k), quicksort can beat the native sort for millions of items, and that different JS engines use different algorithms so stability and equal-key ordering varies.

AI-written summary · about

  1. 0:00Welcome
  2. 1:07Sorting algorithms
  3. 2:30Native JS sort
  4. 4:15JS sort internals
  5. 5:59Small array sorts
  6. 7:01Sort stability
  7. 8:23Insertion sort
  8. 9:50Merge sort
  9. 12:24Quick sort
  10. 14:11Implement your own
  11. 15:33Divide and conquer
  12. 16:17Stability impact
  13. 18:02JS sort performance
  14. 20:12Benchmarking sorts
  15. 21:59Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.