Skip to content

Are iterator functions amortizing vector operations when needles are close by? #184

Answered by BurntSushi
Yomguithereal asked this question in Q&A
Discussion options

You must be logged in to vote

For memmem, they are definitely amortizing construction.

For memchr, I believe they do as well, includes cpuid check. But I'm not sure if it's optimal. There is likely an even smarter amortization strategy (I believe some have posted about it on this repo).

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@Yomguithereal
Comment options

@BurntSushi
Comment options

@Yomguithereal
Comment options

@Yomguithereal
Comment options

@Yomguithereal
Comment options

Answer selected by BurntSushi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants