One of the key metrics when writing code is speed. But there is no convenient way to measure the speed of your code efficiently so far. Chrome and ...
For further actions, you may consider blocking this person and/or reporting abuse
Lighting McQueen fast
Other devs can read my code very fast 😁
I presume you talk about browsers, for backend we have performant choices.
You should also check out Flamegraphs charts, and Dev tools have very mature performance monitoring and analysis tools.
Having the words JavaScript and performance in the same article feels .. weird.
Engines developers, same as JVM and probably .net optimize their engines based on most common practices, so if you write good enough code it will run fast. V8 team have some good talks on youtube about this topic.
Actually, it's not weird. APM for NodeJS is a whole business.
If a team wants performance for its key components and paths will not use nodeJS, it can only go so far ...
When doing JS benchmarks ...
youtube.com/watch?v=r76ZjdzFExg
Great talk & insight. It's like a C dev explained JS perf at byte code level.
AFAIR he worked on the V8 JS engine ;)
Benchmarking is a skill on its own. Today's JS engine use a lot of shortcut and optimization, which impact performance tests.
It's also a balance between clear and maintainable code against fast and optimizable code. With modern computer power, I would largely prefer the first side.
Also, to measure time I would use developer.mozilla.org/docs/Web/API...
Right. console.time is useful for one time use.
If you want to capture measured data, store, analyze, visualize them, etc. then that's not enough.
As fast as your CPU. The performance limitations are CPU, GPU, all sort of processors but not my dear code. 🙌
Maybe DB connections, queries, rendering libs/functions, array lookup, etc. So many factors to measure.
Can't wait for native JS become true (WebAssembly, asm.js. Nectarjs looks promising).
Meanwhile, I will stick with JS :)
Wasm is not a replacement for JS unfortunately
I agree.
@nektro that's just political propaganda.
In reality, it will probably replace it, not only in libraries but all the way to the glue code.
Just needs more features than the MVP release we have now.
But they are definitely on the way.
My sarcasm detector isn't working right now...