Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

JavaScript now just x1.5 slower than C

Name: Anonymous 2013-12-22 15:01

"Asm.js is a subset of standard JavaScript that is simple enough for JavaScript engines to optimize. Now Mozilla claims that with some new improvements it is at worse only 1.5 times slower than native code. How and why?
The problem with JavaScript as an assembly language is that it doesn't support the range of datatypes that are needed for optimization. This is good for human programmers because they can simply use a numeric variable and not worry about the difference between int, int32, float, float32 or float64. JavaScript always uses float64 and this provides maximum precision, but not always maximum efficiency.
The big single improvement that Mozilla has made to its SpiderMonkey engine is to add a float32 numeric type to asm.js. This allows the translation of float32 arithmetic in a C/C++ program directly into float32 arithmetic in asm.js. This is also backed up by an earlier float32 optimization introduced into Firefox that benefits JavaScript more generally. Benchmarks show that firefox f32 i.e. with the float32 type is still nearly always slower than native code, it is now approaching the typical speed range of native code.
Mozilla think that this isn't the last speed improvement they can squeeze from JavaScript. So who needs native code now?"

Name: L. A. Calculus !!wKyoNUUHDOmjW7I 2013-12-26 4:53

>>12
HAHAHAHAA

TOO BAD DAT'S UNHELPFUL IF U FAIL TO MENTION WHICH IMPLEMENTATION U CONSIDER "DA BEST".

MANY C IMPLEMENTATIONS LIKE GCC ALSO LET YA SPECIFY DA OPTIMISATION OPTIONS U WANT. GCC HAS AN OPTION 2 DISABLE OPTIMISATION OPTIONS ENTIRELY, IT HAS ONE 2 OPTIMISE FOR SPACE, AND IT HAS A NUMBER OF DIFFERENT LEVELS FOR OPTIMISING FOR TIME. ALL OF DOSE MODES ARE DIFFERENT SETS OF MORE SPECIFIC OPTIMISATION FEATURES, WHICH CAN BE ENABLED AND DISABLED IF U WANT FINER CONTROL OVER DA OPTIMISATION PROCESS.

BASICALLY, >>1'S STATEMENT IS EVEN MORE RETOIDED THAN SAYING DAT MEN R FASTER THAN WOMEN BECUZ ONE PARTICULAR MAN HAPPENS TO BE FASTER THAN ONE PARTICULAR WOMEN.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List