I agree with Noam (great pictures, better than I found!). I was excited to post some info but what I had to say (and more) was really all in the answers there albeit as "check out these links" and some cases just in the comments. Now I regret that I didn't.
SO Lehmer first used a device made of bicycle chains and rods and later devices made of gears with holes in them. This 1932 article relates in rather breathless prose that one of the gear mechanisms (combined with theory) proved in a few minutes that
the great unconquered nineteen digit number $3,011,347,479,614,249,131$, known to be a factor of $2^{95} + 1$ and suspected to be prime, is indeed prime.
A few years back (maybe 2000?) there was great excitement over rumors that Adi Shamir had a breakthrough which would speed up (the sieving step of) the number theory sieve. The record factoring of an RSA key was for a 465 bit integer and the breakthrough was rumored to make 512 bit keys "very vulnerable." When the details came out of the punnily named TWINKLE device, it turned out to be an electro optical device using LEDs and filters. There were scoffers but it is agreed to be quite clever. However it has never been built. Enhanced (theoretical) versions might threaten 768 bit keys (for an organization willing in 2000 to invest in 80,000 pentium 2 PCS and 5000 TWINKLE devices for 9 months). 1024 bit keys are probably beyond that and I think that the state of the art in unbuilt (or so they say...) special purpose devices is no longer optical.
If the question is reopened I would export this answer although I'm sure that others could do a better job.