Top all-time · #575
mrale.ph
Personal blog · mrale.ph/blog · on HN as mralephprogrammingsystems
mrale.ph is a personal blog at mrale.ph about programming and systems. Since 2012, 104 different Hacker News readers have linked it 144 times, most often “Maybe you don't need Rust and WASM to speed up your JS (2018)”. It is still writing: the last post was on 2026-10-06, and you can follow it by feed.
Rarely recommended · 5 of 40 sampled comments recommend it?
Why HN links it
HN readers link Vyacheslav Egorov's posts for deep V8 and JS engine internals, such as hidden classes, inline caches, and why asm.js and WASM comparisons miss what engines can do.
- Recommended for · 5 comments
- One commenter calls the Egorov blog full of hidden goodies and says he always has great live presentations; another says the Go microbenchmark write-up should g
Summarised by Claude from a sample of 40 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Most-linked posts?
- Maybe you don't need Rust and WASM to speed up your JS (2018)13 people · 13 mentions · first linked 2018-04-19
- Why Asm.js Bothers Me10 people · 11 mentions · first linked 2013-03-28
- What's up with monomorphism?9 people · 10 mentions · first linked 2015-01-13
- Introduction to Dart VM7 people · 7 mentions · first linked 2019-01-07
- IRHydra²5 people · 7 mentions · first linked 2014-12-26
- What's Up with Monomorphism? (2015)5 people · 5 mentions · first linked 2018-07-13
- /5 people · 5 mentions · first linked 2013-05-15
- Grokking V8 closures (2012)5 people · 5 mentions · first linked 2012-09-28
- Grinch about the array.length caching4 people · 4 mentions · first linked 2014-12-24
- The trap of the performance sweet spot (2011)4 people · 4 mentions · first linked 2013-04-03
What Hacker News says?
Not sure the date. I first noticed the change back in April, when I was profiling some code. Ask vegorov: http://mrale.ph/blog/2012/09/23/grokking-v8-closures-for-fun... .
Comment linking /blog/2012/09/23/grokking-v8-closures-for-fun.html
on “Introducing Swift”Submitted Maybe you don't need Rust and WASM to speed up your JS as a story · 600 points
HN discussionhumble opinion: N years of using any language won't make you an expert. There's knowledge about how to express certain patterns in a given language, more like an application design expertise. There's knowledge and familiarity with the APIs. And then there's the deep language knowledge, the one that pretty much only someone implementing a language VM, parser, compiler and other tools may acquire with time. Also, ther…
Comment linking /
on “Eloquent JavaScript 3rd Edition (2018)”Submitted Why Asm.js Bothers Me as a story · 274 points
HN discussionHi, I'm working on the editor since almost 5 years now. Phew, time flies. There is no silver bullet, we mostly try to keep all computations limited to the viewport size (if you have 20 lines visible, then typing, colorizing, painting a frame, etc. should all end up being computed with loops covering those 20 lines and not the entire buffer size). We also use extensively the profilers, and most recently (last month)…
Comment linking /irhydra/2/
on “The Monaco Code Editor”Submitted Benchmarking JS as a story · 131 points
HN discussionThere is some information at https://mrale.ph/dartvm/ but there is nothing really comprehensive right now.
Comment linking /dartvm/
on “Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop”Submitted Adventures in the land of substrings and RegExps as a story · 129 points
HN discussionJIT engines usually don't do static analysis. I'm not sure if that is because the cost for that is that much higher, but a hint towards why could be that the engine simply does not know which parts of the (potentially huge amounts of) code that was loaded is actually going to be needed during execution, so analysing all of it is likely to bring more harm than gain. As an example for something that static analysis co…
Comment linking /blog/2018/02/03/maybe-you-dont-need-rust-to-speed-up-your-js.html
on “Maybe you don't need Rust and WASM to speed up your JS”Submitted Maybe you don't need Rust and WASM to speed up your JS (2018) as a story · 126 points
HN discussionUltimately, much of the enthusiasm over WASM, like ASM.JS, is rooted in the idea that it's extremely difficult to improve JS engine performance. ASM.JS used certain conventions to essentially create a "language within JS", while WASM is a new language altogether. The goal was the same in both cases: construct a language that is easier to optimize and make the end users conform. The key takeaway of your commentary on…
Comment linking /blog/2013/03/28/why-asmjs-bothers-me.html
on “Maybe you don't need Rust and WASM to speed up your JS”Submitted Introduction to Dart VM as a story · 109 points
HN discussionNot what I said. I said to avoid /hand-optimizing/ code. Trying to write performant code is good. Some examples of advice on that front: - use an appropriate algorithm, and make sure the logic is free of bugs. For example, accidental out-of-bounds array accesses can really hurt performance. - avoid needless computations. Don't do something (complex) twice if doing it once is enough. If this sounds like "use common s…
Comment linking /blog/2014/12/24/array-length-caching.html
on “How JavaScript works: inside the V8 engine”Submitted Micro Benchmarking Dart as a story · 72 points
HN discussionThis has to do with monomorphic versus polymorphic and megamorphic functions. Basically, the inline cache has finite capacity, and if every call of a given function takes objects of the same shape (they share a hidden class), then you don't need to worry about evicting your cache entries. Once you start passing in objects of different shapes though, you're going to exceed the inline cache's capacity, and start losin…
Comment linking /blog/2015/01/11/whats-up-with-monomorphism.html
on “How JavaScript works: inside the V8 engine”Submitted New Fn() vs. Object.create(P) as a story · 67 points
HN discussionVyacheslav Egorov wrote an article[0] on monomorphic function calls and how they impact JavaScript performance. While it's very in-depth, it is over 2 years old at this point, so I'm not sure how well it applies to the current version of V8. [0] http://mrale.ph/blog/2015/01/11/whats-up-with-monomorphism.h...
Comment linking /blog/2015/01/11/whats-up-with-monomorphism.html
on “How JavaScript works: inside the V8 engine”Submitted Browser as an Interactive Disassembler (2015) as a story · 66 points
HN discussionI don't think there are any really solid approaches here except to use IRHydra [0], which lets you decompile v8's optimized version of a function into an assembly-like representation. But I'm pretty skeptical of whether anyone but v8 engineers can really make use of it. I think the only workable approach is what you're doing - have an approximate idea of how the compiler works and make intelligent guesses about what…
Comment linking /irhydra/2/
on “How JavaScript works: inside the V8 engine”Submitted Microbenchmarks Are Experiments as a story · 57 points
HN discussionIn JavaScript every object is basically a hashtable. In order to get acceptable performance JS engines build type descriptions ("hidden classes" or sometimes just "maps") behind your back. That is, if you create a JS object (hashtable) with fields `x` and `y` it will create a hidden class with those two fields. This way it can access the fields efficiently. See http://mrale.ph for much more information on JS engines…
Comment linking /
on “Will you drown?”Submitted The Black Cat of Microbenchmarks as a story · 52 points
HN discussionYou can defeat inlining by using closures: function thunk(x){ return function() { x() } } const thunkFoo = thunk(foo) const thunkBar = thunk(bar) for(var i = 0; i < 10000; i++) { thunkFoo() thunkBar() } This is why the "Maybe you don't need Rust to speed up your JS" author was creating functions dynamically using `new Function()`. Maybe you cal get away with function call(x){ x() } for(var i = 0; i < 10000; i++) { c…
Comment linking /blog/2018/02/03/maybe-you-dont-need-rust-to-speed-up-your-js.html
on “Hello wasm-pack”Submitted V8 crankshaft vs. arguments object as a story · 49 points
HN discussionHere are a bunch of blogs from my RSS reader that I think are worth reading. Some of them haven't updated in a while, but the archives may be worth a look anyway. * Blogs with a math focus: http://blog.sigfpe.com http://bit-player.org http://mathr.co.uk/blog/ https://www.johndcook.com/blog/ * Blogs with a programming languages focus: https://existentialtype.wordpress.com https://bluishcoder.co.nz http://blog.ezyang.…
Comment linking /
on “Ask HN: What programming blogs do you follow?”Submitted The fear of dart:mirrors as a story · 36 points
HN discussionhttp://mrale.ph/blog/2015/01/11/whats-up-with-monomorphism.h...
Comment linking /blog/2015/01/11/whats-up-with-monomorphism.html
on “Announcing Flutter beta 1: Build beautiful native apps”Submitted What's up with monomorphism? as a story · 35 points
HN discussionDart VM is written primarily in C++. There is bytecode, but the story here is kinda complicated - there are actually 2 different versions: one is called DBC and is used during development of Flutter applications on iOS, there is another called KBC - that one is more like a classical bytecode, it is currently in development. > And is there a place where more details are available? You can get some high level informat…
Comment linking /dartvm
on “Flutter desktop shells”Submitted Transpiling Smalltalk to JavaScript as a story · 28 points
HN discussion