Good point. Have two programs - one checking every even number and returning odd of not even. And then have a program checking every odd number and returning even if not. Then, a simple program to dispatch to either program randomly, so you end up in the long term with good performance for each.
That sounds kinda stupid, it would completely destroy the original space savings. Unless the sharding makes it fit within compiler limits.
Why not run both and use the result retrieved the fastest.