achingbrain / achingbrain/uint8arraylist

Omit type-checking on append

Aperta
#58 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
11
Fork
9
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Currently on append "instanceof Uint8array" is called on every element, which does have an effect on the performance. It would be ideal instead that append method would only accept Uint8array and utilize Typescript types to make sure we are not appending things of wrong type.

For the case where we want to append UInt8ArrayList, we could have a separate method like, `join` or `merge` to cover that specific case.

For the append-all benchmark I can get 5.9m ops/s without type checking
and 5.5m ops/s with type checking

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.