[PR #1204] [MERGED] Reduce fdiv's into fmul's #1763

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

📋 Pull Request Information

Original PR: https://github.com/google/brotli/pull/1204
Author: @heshpdx
Created: 10/5/2024
Status: Merged
Merged: 11/19/2024
Merged by: @copybara-service[bot]

Base: masterHead: master


📝 Commits (5)

  • cefec3c Reduce fdiv's into fmul's
  • cec846f Update c/enc/block_splitter_inc.h
  • 1054ecc Add static variables as per code review comments.
  • 782aadd Apply suggestions from code review
  • 8c6d25f Update c/enc/encode.c

📊 Changes

3 files changed (+11 additions, -6 deletions)

View changed files

📝 c/enc/block_splitter_inc.h (+4 -2)
📝 c/enc/encode.c (+3 -2)
📝 c/enc/literal_cost.c (+4 -2)

📄 Description

Provides small speedup on microarchitectures where the floating point divide is slower than the floating point multiply.

As measured on an Ampere Altra, I see about +0.5% depending on the input.

$ ./brotli.old -fvk -w 0 enwik8.xhtml
Compressed [enwik8.xhtml]: 95.367 MiB -> 24.549 MiB in 237.92 sec

$ ./brotli.new -fvk -w 0 enwik8.xhtml
Compressed [enwik8.xhtml]: 95.367 MiB -> 24.549 MiB in 236.72 sec

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/google/brotli/pull/1204 **Author:** [@heshpdx](https://github.com/heshpdx) **Created:** 10/5/2024 **Status:** ✅ Merged **Merged:** 11/19/2024 **Merged by:** [@copybara-service[bot]](https://github.com/apps/copybara-service) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (5) - [`cefec3c`](https://github.com/google/brotli/commit/cefec3ce9dc6430ac546b2e4985f917adfa0d513) Reduce fdiv's into fmul's - [`cec846f`](https://github.com/google/brotli/commit/cec846f88e7e632933773b2c3c43d3ad13992e96) Update c/enc/block_splitter_inc.h - [`1054ecc`](https://github.com/google/brotli/commit/1054ecc262a046e3368ca77c70c945c61a6d9a8b) Add static variables as per code review comments. - [`782aadd`](https://github.com/google/brotli/commit/782aadd0ff957d738412508bd07cafa55b399a49) Apply suggestions from code review - [`8c6d25f`](https://github.com/google/brotli/commit/8c6d25f7f8fab5b0793b7632481a8c609a8184e9) Update c/enc/encode.c ### 📊 Changes **3 files changed** (+11 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `c/enc/block_splitter_inc.h` (+4 -2) 📝 `c/enc/encode.c` (+3 -2) 📝 `c/enc/literal_cost.c` (+4 -2) </details> ### 📄 Description Provides small speedup on microarchitectures where the floating point divide is slower than the floating point multiply. As measured on an Ampere Altra, I see about +0.5% depending on the input. ``` $ ./brotli.old -fvk -w 0 enwik8.xhtml Compressed [enwik8.xhtml]: 95.367 MiB -> 24.549 MiB in 237.92 sec $ ./brotli.new -fvk -w 0 enwik8.xhtml Compressed [enwik8.xhtml]: 95.367 MiB -> 24.549 MiB in 236.72 sec ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 20:55:41 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#1763