[PR #636] Use MSVC intrinsics in Log2FloorNonZero and FindMatchLengthWithLimit #1288

Open
opened 2026-01-29 20:53:21 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/google/brotli/pull/636

State: closed
Merged: Yes


This PR finishes off the work started in https://github.com/google/brotli/pull/618

Switched compiler intrinsic code to use more generic switches and added MSVC-specific versions of the clz and ctz calls where the GCC __builtin functions are used.

Preliminary testing shows an almost 10% speed improvement for encoding on Windows x64.

**Original Pull Request:** https://github.com/google/brotli/pull/636 **State:** closed **Merged:** Yes --- This PR finishes off the work started in https://github.com/google/brotli/pull/618 Switched compiler intrinsic code to use more generic switches and added MSVC-specific versions of the clz and ctz calls where the GCC __builtin functions are used. Preliminary testing shows an almost 10% speed improvement for encoding on Windows x64.
claunia added the pull-request label 2026-01-29 20:53:21 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#1288