AdamNiederer / AdamNiederer/faster

Arbitrary collect support

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

説明

I noticed that some methods return `Vec`s. In particular, it's `stride` and `scalar_collect`. I was wondering if it made sense to expose generic version that could use arbitrary `FromIterator` type. My motivation for this is:

* It would allow for use in nostd environment, for example with arrayvec.
* It would allow storing the results on the stack, again with arrayvec or with smallvec (to avoid allocations for the small cases while falling back on it in the big ones when the allocation cost is amortized).

The original methods could still be preserved, as wrappers with `Vec` implementation. Does it make sense? Should I send a pull request for that?

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

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

評価

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

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

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