Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Auto-vectorization is an extremely complicated topic. This stuff is slow. Not a big deal with AOT compilation, but it's of course a huge deal if you only have a few msecs to spare.

Also, a machine can't just jumble the operations around because that would change the result.

  >> 0.1 + 0.2 + 0.3
  0.6000000000000001
  >> 0.1 + (0.2 + 0.3)
  0.6
So, this is apparently something you have to do yourself. A compiler won't know what kind of data will be fed to that function. It can't make an informed decision.

> In fact I am not even sure what kind of physics needs SIMD.

It generally just means that you use some physics library which makes use of SIMD. Without having to do anything special, your game will run drastically better an use less energy to boot.

That's the primary use case; using libraries which use SIMD. Most people won't bother doing that by themself.



If speed and compilation is a concern, let's start with having proper types in javascript. That will speed things up a whole lot faster and save a lot of battery than this.

I am not saying this won't make things faster. There are many things you can do to make things faster but this really is such a niche feature (for web based apps).


> If speed and compilation is a concern, let's start with having proper types in javascript.

That is a much harder problem, especially since you brought up performance. Getting the interaction between dynamically typed and statically typed code to work in a way that's both easy and natural to use and allows compilers to get significant benefits from the statically typed code is an unsolved research problem.


> this really is such a niche feature

Yes, it is. However, it's relatively easy to implement and the performance improvements and battery savings are fairly huge. All things considered, it's a pretty good deal.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: