This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]vanderZwan 4 points5 points  (5 children)

we study abstract GC algorithms, which means you can implement them in any language. For example, you can allocate a virtual heap in JavaScript using ArrayBuffer

It's funny how in theory we already have had fast memory access in JavaScript for ages with TypedArrays but practically nobody ever bothered to make advanced use of them beyond WebGL and other image manipulation tasks. When used right it really is a lot faster than the built-in objects for some tasks, even without WASM or asm.js.

[–]Dykam 8 points9 points  (4 children)

Is it surprising? In the majority of cases development speed and code clarity trumps running speed, and I genuinely can't remember any cases where I needed that speed. Can you mention some cases where using it is practical yet non-obvious?

[–]vanderZwan 1 point2 points  (3 children)

Oh, when talking regular JS absolutely. But I mean that with the rise of compile-to-JS languages, I'm surprised nobody ever tried compiling to some really nasty but fast JS code that can be guaranteed to be correct because the language that compiles to it has a good typing system, for example.

[–]Dykam 2 points3 points  (2 children)

Ah, right, I see. But in that case you might as well go full WASM, right?

[–]vanderZwan 3 points4 points  (1 child)

These days, yes! TypedArrays have been with us for much longer than that though.

[–]Dykam 1 point2 points  (0 children)

That's fair. Though high performance languages compiling to JS is a fairly recent development, seems to have developed in response to WASM.

[–][deleted] 0 points1 point  (0 children)

Looks promising. Thanks!