Re:JavaScript Conquered the Web, Now It’s Taking Over the De...
by aikah on Tuesday September 13, 2016 @08:26AM
(#12487492)
Please :
> Yes, they do, via Web Workers.
Which are not part of the javascript spec, it is DOM related. And web workers were never meant to increase performance. In fact in practice they don't, they often make code slower. They just guarantee that the UI thread will not block.
> new Array(10)?
Which doesn't allow any specific runtime optimization as the array can be resized at anytime
> Uint8Array, Uint16Array, Uint32Array?
Which doesn't give me an integer of a specific size BUT any array of integer.
Yes, they do, via Web Workers. They just don't support multithreading at the level of concurrent access to the DOM, and they don't support shared memory. Very few native libraries support concurrent access to UI widgets, and not many native applications make heavy use of shared memory for compute either. (Most native applications don't have heavy compute needs in the first place…)
> Give me an array of 10 elements
new Array(10)?
> give me a integer of that length
Uint8Array, Uint16Array, Uint32Array?