*n* Primes by Trial Division Results

9 February 2019

This is a simple benchmark, which measures the time it takes to calculate and display
the first *n* prime numbers, using the method of trial division.

The point is to have some fixed quantum of work that is simple enough to be expressed
in a limited BASIC language, as might have been implemented in ROM in an '80s home micro.
That there are more efficient ways to calculate prime numbers is irrelevant. Some results
in the table are marked *null*, indicating printing was suppressed. No other attempt
was made to account for differences in I/O performance; a fast machine with a slow console
will deliver a slow result (see especially the Forth OpenFirmware results).

Times are in seconds, rounded down (to the nearest tenth, if less than 3). Applesoft BASIC provides the reference implementation, for no other reason than that's the one I wrote first. Source code for all variants is linked at left.

Use the selection lists below to filter the results.