3 ms·
Here 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_p
by okl 9y ago
Here 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.