|
|
|
|
|
by glangdale
365 days ago
|
|
To paraphrase Arthur Dent, "this must be a strange new usage of the word 'fastest' with which I am not previously familiar". The fastest way to detect a vowel in a string on any reasonable architecture (Intel or AMD equipped with SIMD of some kind) is using 3-4 instructions which will process 16/32/64 (depends on SIMD length) bytes at once. Obviously access to these will require using a Python library that exposes SIMD. Leaving SIMD aside, a flat byte array of size 256 will outperform a bitmap since it's always faster to look up bytes in an array than bits in a bitmap, and the size is trivial. |
|