:ihavenomouth: on Nostr: I moved 1 (one) integer division out of a hot loop, and the entire thing now runs ...
I moved 1 (one) integer division out of a hot loop, and the entire thing now runs 8-10% faster. I can't move the second division, but I can replace both with bit shifts. The downside is that I won't be able to support 4
x or 3:x:y chroma subsampling (implicitly allowed by the specification) which is not actually a downside because fuck you if you use it
Published at
2024-02-09 15:04:59Event JSON
{
"id": "ec76fabc5d2131c76a3274d8c987eced81a31a7165554cdbd1c4baa51ab19fc0",
"pubkey": "80ee8adeda8e5da3db21e3c53e89092adbf79cadb7074e8d61ad5f759803c1c5",
"created_at": 1707491099,
"kind": 1,
"tags": [
[
"emoji",
"3",
"https://clubcyberia.co/emoji/alphabet/3.png"
],
[
"proxy",
"https://clubcyberia.co/objects/e0b63406-0edd-4205-93b5-e1d928793258",
"activitypub"
]
],
"content": "I moved 1 (one) integer division out of a hot loop, and the entire thing now runs 8-10% faster. I can't move the second division, but I can replace both with bit shifts. The downside is that I won't be able to support 4:3:x or 3:x:y chroma subsampling (implicitly allowed by the specification) which is not actually a downside because fuck you if you use it",
"sig": "fcaa48355735246d90425452ae908530b662fc7e73bef9eba0c6a0a3c2aeb3ef1fee63098dc0ed6006404166dea3a76b1f627534b7dcba19eeea54f03148c1ba"
}