Spec speedup generator

Work in progress (some more stuff will be added) but I appreciate any comments.