I see an iteration of every possible factor for the numbers given. Continuing from 999 further on to 1400, the code doesn't work anymore (It claims 1369 to be prime).
So, to be precise, the code does not compute 'primes', the code lists every number that is not devisable by any number from 2 to 32.
There is a precomputation that 32 is the (rough) square root of 1000. There is no precomputation of primes. It is true that the code will not work beyond 1000, unless you also add more selectors.
So, to be precise, the code does not compute 'primes', the code lists every number that is not devisable by any number from 2 to 32.