あらまし strlen() という関数がある。御存知の通り、文字列の長さを算出する標準 C ライブラリの関数だ。 やってることは単純で、例えば以下のように実装できる。 size_t strlen_simple(const char* str) { const char* p = str; while (*p) ++p; return size_t(p - str); } '\0' が見つかるまでポインタを進め、初期位置との差分を返すだけだ。これで機能的には std::strlen() と同等である。 では、速度的にはどうだろう?適当にベンチマークを書いて MSVC 2022 でコンパイル&実行するとこうなった。
Google recently published a blog article and paper introducing their SIMD-accelerated sorting algorithm. SIMD stands for single instruction, multiple data. A single instruction is used to apply the same operation to multiple pieces of data. The prototypical example is addition, where one instruction can do e.g. 4 32-bit additions. A single SIMD addition should be roughly 4 times faster than perfor
libjpeg-turbo Home About libjpeg-turbo Professional Services Sponsors SIMD Coverage of the libjpeg Algorithms "libjpeg-turbo" != "TurboJPEG" Mailing Lists Downloads Digital Signatures (Code Signing Policy) Official Binaries: Supported Platforms and Other Notes YUM and APT Repositories Documentation Reports libjpeg-turbo Performance Study A Study on the Usefulness of DCT Scaling and SmartScale Othe
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く