AdamNiederer / AdamNiederer/faster

Arbitrary collect support

Open
#35 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1.6k
Forks
52
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.