4 ms·
Show HN: Non-invasive, type-safe C data structures with GCC builtins
- okl 9y agoHere are some non-invasive, type-safe data structures in C that are based on macros and GCC builtins (Should also build with recent Clang). When writing prioq_pop(), I figured it would be simpler to generate code by replacing text with sed/perl/python. The amount of optimization that is performed by compilers with known arguments is impressive.