add runtime-gen test
wip
Manually inline things for 10% speedup