mp4box.js icon indicating copy to clipboard operation
mp4box.js copied to clipboard

Bit manipulation performance

Open cconcolato opened this issue 10 years ago • 3 comments

Some results indicate that bit manipulation using DataView is not efficient: http://jsperf.com/dataview-vs-typed-array-views https://groups.google.com/forum/#!topic/dashjs/5PmEkjKILDQ (dash.js member-only)

We should reconsider the use of DataView, ie. the use of DataStream.

cconcolato avatar May 21 '15 12:05 cconcolato

Do we have alternatives? Typed array view? Bit twiddling? Others?

rbouqueau avatar May 21 '15 12:05 rbouqueau

The JSPerf site indicates (at least for me in Chrome) that a 100x speed-up factor can be achieved when using your own bit-twiddling operations. So far, I haven't hit perf issues. If it happens, we'll start from here probably. But that's low priority.

cconcolato avatar May 26 '15 16:05 cconcolato

Old topic but dataview seems to have gotten better? https://v8.dev/blog/dataview

jimmywarting avatar Feb 05 '21 22:02 jimmywarting