www.utahjs.com
2016 UtahJS Conference
Friday, September 16, 2016
Slides: https://docs.google.com/presentation/...
Time ran out quickly, let's reiterate the important take aways of the talk: 1 Test instead of trusting ""best practices"" (see below for how). 2 Do not get lost in micro optimizations but also do not ignore performance testing, use PTSD like you would TDD.
How to easily test? Unfortunately JSPerf does not work any more, so here is an offline version http://db.marknadal.com/ptsd/ptsd.html (it comes pre-filled with the tests from the talk, but you can easily just copy&paste code in and hit ""run"").
What is PTSD? Performance Testing Speed Development is a development philosophy like TDD that lets you include performance optimizations into your code, but without the distraction or debate. Most people avoid performance testing entirely because of the subjective nature of micro optimizations (we've repeatedly seen inconsistencies in Chrome over just a few months, let alone Firefox and others), however this leads to a dangerously ignorant community - but science can be on our side! The rule to performance testing is simple: Paste in a couple variations of code, run them, choose the winner (or the fastest of the most readable ones), get back to work.
We have seen significant gains in our Open Source Firebase product ( http://gun.js.org/ ) using these techniques, achieving 30M+ ops/sec ( see https://github.com/amark/gun/wiki/100... ). You too can apply PTSD and squeeze reasonable results out without the pain or debate.
Watch video How to write Performant JavaScript- Mark Nadal online, duration hours minute second in high quality that is uploaded to the channel UtahJS 23 September 2016. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 3,432 times and liked it 80 visitors.