JavaScript Endian Encoding?

后端 未结 6 1280
清歌不尽
清歌不尽 2021-02-04 10:18

A response on SO got me thinking, does JavaScript guarantee a certain endian encoding across OSs and browsers?

Or put another way are bitwise shifts on integers \"safe\"

6条回答
  •  [愿得一人]
    2021-02-04 11:00

    Yes, they are safe. Although you're not getting the speed benefits you might hope for since JS bit operations are "a hack".

提交回复
热议问题