Loliphile on Nostr: Actually, I found a case where the zig compiler does optimize more in ReleaseFast ...
Actually, I found a case where the zig compiler does optimize more in ReleaseFast mode than ReleaseSmall mode: if you do operations on a vector's elements one by one, ReleaseFast will use SIMD instructions, but ReleaseSmall will not. Of course, if you just use a vector operation, even ReleaseSmall will use SIMD instructions.
https://godbolt.org/z/jrWTbqEGGPublished at
2024-06-03 17:49:54Event JSON
{
"id": "eb73c0181c3403e2ddeaa6c0d221eacae0580f537908d9209f5c7f2b609ccd19",
"pubkey": "37649bc1a469a41d8b7c8a43ad6e93a8f2b73d8b72fdc34f2751a1b3ac62b786",
"created_at": 1717436994,
"kind": 1,
"tags": [
[
"proxy",
"https://jir.moe/objects/a2acd600-1146-4fb7-858c-ef9a4de053bc",
"activitypub"
]
],
"content": "Actually, I found a case where the zig compiler does optimize more in ReleaseFast mode than ReleaseSmall mode: if you do operations on a vector's elements one by one, ReleaseFast will use SIMD instructions, but ReleaseSmall will not. Of course, if you just use a vector operation, even ReleaseSmall will use SIMD instructions. https://godbolt.org/z/jrWTbqEGG",
"sig": "af88c43a2661ab6c0b24c82078308c9fe302f45e4836f7392759928a54f20376502abd1800726034a256d1f56605c1bafeea04b381a067a117b29ee097fb8a19"
}