Sometimes complex wins over simple A single complex solution is better than many simple ones If everybody uses the same code, everybody wins Even if there may be some performance cost Sometimes the compiler can optimize away complexity __builtin_constant_p() often helps or structures that downgrade to identity assignments Example: Linux virtual memory The various CPU types organized their pate tables in 1, 2, 3 or 4 levels. Linux code is working with 4 levels, always. The same code is used for all CPU architectures Code is laid out so to optimize away some levels Design a generic API that covers all cases This avoid conditionals in the calling code Then, some back-end may miss some features and error out