New opportunities for D => ASM.js

Nicolas F. via Digitalmars-d digitalmars-d at puremagic.com
Tue May 13 10:30:43 PDT 2014


> I'd like to point out that asm.js is a very fast subset of the 
> javascript language that allows almost native speeds (3x 
> slowdown vs C only) which enables games to be run in the 
> browser without external dependencies.

It also doesn't do multithreading, as far as I know. Also three 
times slower for peak performance is not near-native. It's 
bullshit Mozilla marketing. (They actually use the expression "2x 
the speed", yes, it's hilarious.)

And I still think the browser is a terrible platform for anything 
but small flashgames-like games.

> - Opens the door to petaFLOPS of distributed CPU power based 
> simply on website visitation without affecting user experience

If you have JS doing heavy computation on your website for every 
visitor, I'm sure you'll soon run out of visitors to reach that 
number, because that's not a very nice thing to do. It does 
affect user experience.

> - Allows Javascript proprietary code to be harder to 
> de-obfuscate or reverse engineer

That's not an advantage. That's terrible. Please stop.

> - FAST Browser-based database engines and full runtime 
> capabilities can be developed (and added as browser extensions 
> for persistence) to be actively used by the server with a 
> simple interface

"Fast". For reference: If some JS-thing says "fast", it usually 
means "it's not quite so terrible as before". Also, are you 
suggesting that putting a database on the client browser, and 
then having a server call that for data is a good idea and fast?

> And most of all, it simplifies web development.

Hardly.

The only good idea that I see in this is that it allows you to do 
client-side web-development without having to use JS.


More information about the Digitalmars-d mailing list