Skip to content

Conversation

@dcodeIO
Copy link
Member

@dcodeIO dcodeIO commented Nov 13, 2019

This is an experiment to add the more concrete SIMD types

  • i8x16
  • u8x16
  • i16x8
  • u16x8
  • i32x4
  • u32x4
  • i64x2
  • u64x2
  • f32x4
  • f64x2

in addition to (or potentially replacing) the v128 type.

I started with the goal to support someVector[0] compiling to i32x4.extract_lane / i32x4.replace_lane etc. and to provide someVector * someVector operator overloads, but then realized that especially the latter can't be expressed in TypeScript since someVector must be of type number so it doesn't trigger TS errors, but after the binary operation loses the index signature, again leading to a TS error.

So I stopped there for now, but pinning it here in case someone has an idea. Maybe it's not even necessary, don't know.

@dcodeIO
Copy link
Member Author

dcodeIO commented May 16, 2020

Closing this PR as part of 2020 vacuum as it hit major road blocks and should be re-evaluated once we have concrete information on how SIMD will be used in the wild. I expect that something like this will eventually be brought up, including suggestions on how it should be designed most likely in a different way than proposed here.

@dcodeIO dcodeIO closed this May 16, 2020
@dcodeIO dcodeIO deleted the simd-types branch June 1, 2021 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants