A Framework for Runtime Code Generation and Compiled DSLs