WebAssembly / WebAssembly/multibyte-array-access

Support for all primitive array types (i16, u8, f32, etc.)

Aperta
#3 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
WebAssembly
Stelle
4
Fork
1
Merge medio
16h 35m
PR unite (30g)
1

Descrizione

I have a feeling that limiting this proposal to only work on i8 arrays (i.e. (array i8) and (array (mut i8))) would not really bring any benefits with regard to ease of implementation, and would only preclude other potential use-cases. Given that the current version of this proposal already assumes that i8 arrays are likely to be backed by some packed memory buffer through which performant multi-byte accesses are possible, I don't think it's a stretch to further assume that all array types with any primitive or packed numeric type will be backed by untyped memory buffers which can also support multibyte array accesses.

For example, the JS String Builtins proposal works with the (array (mut i16)) type to represent UTF-16 characters in strings. By limiting this proposal to just i8 arrays, it would still not be possible to speed up certain string operations with SIMD, which could otherwise enable faster parsing, string lookups, regular expressions, etc. Remember that in the current GC proposal, there is no way to cast between different array types.

@brendandahl let me know what you think about this.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia leggendo l’attuale proposta su multibyte-array-access e la proposta collegata su JS String Builtins, concentrandoti su come sono rappresentati i tipi di array numerici primitivi e packed. L’issue non indica file né test; il lavoro sarebbe completato con una decisione risolta sulla proposta riguardo a se e come supportare tutti i tipi di array primitivi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
wasm
Ambito
compilers
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.