Thu 07 Aug 2003

Another Radiant update...

That was quick! You can now specify a right-hand cutoff:

radiant_map 1000 50 -q

gives a 50 cutoff, going up to 1000, in quiet mode.

Posted at 2003-08-07 10:36:10 by RichardLink to Another Radiant up…
Comments, trackbacks.

Radiant and things

Well, not much happening. It's devastatingly hot - up to 33 degrees C in my room. Not as bad as Seville, where it reportedly hit 54 C last week.

The Accord is wonderful; it also achieved 100% and came top of the latest reliability survey. Good machine.

I've been doing very little actual work; nothing on Slate, some fiddling in Python (anyone know a good curses menu module, or a PIM/calendaring one?), but a few updates to Radiant.
I thought it might be an improvement to reduce the time spent in prime() (the worst offender according to my profiler). So I set about putting in a result caching system using a map to store primality for requested numbers (assuming that they would come up often).
The result:
 MapNo Map
Executable size30K26K
Time for 10,000 runs2:39.5783:09.377


The trend is for more noticeable difference with increasing n, so anyone wanting a massive, 20,000-item radiant sequence should be pleased with the improvement. At some point I'll also implement a right-hand cutoff, as that will improve matters.

You can get the new version on the project page.

Posted at 2003-08-07 10:28:36 by RichardLink to Radiant and things
Comments, trackbacks.

Google
Web holygoat.co.uk
  • richard is: