Specialized primitive

Feel free to rebase and --force your branch to have a clean pull request.

(Also you could maybe remove the branches `specialized-primitive-old` and `specialized-primitive-cleanup`, the latter being a bit distracting.)