achingbrain / achingbrain/uint8arraylist

Omit type-checking on append

オープン
#58 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
11
フォーク
9
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。