See: https://bugs.llvm.org/show_bug.cgi?id=35582
Since Wasm has to use 32-to-16 bit instructions to narrow values down, 32-bit should be a tad faster for operations needing 16 or more bits.
Paths
| Differential D41941
[WebAssembly] Change int_fast16_t to 32-bit Changes PlannedPublic Authored by ncw on Jan 11 2018, 2:32 AM.
Details Summary See: https://bugs.llvm.org/show_bug.cgi?id=35582 Since Wasm has to use 32-to-16 bit instructions to narrow values down, 32-bit should be a tad faster for operations needing 16 or more bits.
Diff Detail
Event TimelineHerald added subscribers: cfe-commits, aheejin, jgravelle-google and 2 others. · View Herald TranscriptJan 11 2018, 2:32 AM
Comment Actions As @nw points out, clang's lib/Headers/stdint.h doesn't support this yet. Unless anyone feels strongly, I now propose we close this and just leave int_fast16_t/uint_fast16_t as-is.
Revision Contents
Diff 129415 lib/Basic/Targets/WebAssembly.h
test/Preprocessor/init.c
|
I think we want least16_t to still be short, no? We do still support 16-bit shorts, so my interpretation is that the smallest type with width of at least 16 should still be 16.