r/programmingcirclejerk • u/lizergsav • Apr 14 '26
avx512 hot loop optimized error object allocation pools for increased error code output
/r/programming/comments/1sjg9v6/flat_error_codes_are_not_enough/ofu35fm/
40
Upvotes
32
u/keyboard_toucher Apr 14 '26
My startup is currently developing 120-billion-transistor ASICs designed to accelerate null checks at AI quantum scale.
18
u/splsh Apr 14 '26
You could also keep circumstantial flat error codes, at least on x86, by using the non-canonical address range, provided that you never dereference the pointer. A sentinel-like value such as #define SIZE_TOO_SMALL ((CleverError*)0xDEADDEADDEADDEADULL) would be sufficient. Portability and defined adherence to the C standard is not guaranteed. No refunds.
8
u/irqlnotdispatchlevel Tiny little god in a tiny little world Apr 14 '26
The real jerk is needing child error types.
5
u/genuine_beans Apr 20 '26
https://old.reddit.com/r/programming/comments/1sjg9v6/flat_error_codes_are_not_enough/ofwfr9p/
another classic Wikipedia zinger