<s>
The	O
Byte	B-Language
Sieve	I-Language
is	O
a	O
computer-based	O
implementation	O
of	O
the	B-Algorithm
Sieve	I-Algorithm
of	I-Algorithm
Eratosthenes	I-Algorithm
published	O
by	O
Byte	O
as	O
a	O
programming	O
language	O
performance	O
benchmark	O
.	O
</s>
<s>
The	O
solution	O
was	O
inspired	O
by	O
a	O
meeting	O
with	O
Chuck	O
Forsberg	O
at	O
the	O
January	O
1980	O
USENIX	B-Operating_System
meeting	O
in	O
Boulder	O
,	O
CO	O
,	O
where	O
Forsberg	O
mentioned	O
an	O
implementation	O
of	O
the	O
sieve	O
written	O
by	O
Donald	O
Knuth	O
.	O
</s>
<s>
The	O
algorithm	O
mostly	O
stresses	O
array	O
lookup	O
performance	O
and	O
basic	B-Language
logic	O
and	O
branching	O
capabilities	O
.	O
</s>
<s>
The	O
article	O
provided	O
reference	O
implementations	O
in	O
ten	O
languages	O
,	O
including	O
more	O
popular	O
selections	O
like	O
BASIC	B-Language
,	O
C	B-Language
,	O
Pascal	B-Application
,	O
COBOL	B-Application
,	O
and	O
FORTRAN	B-Application
,	O
and	O
some	O
less	O
well-known	O
examples	O
like	O
Forth	B-Application
,	O
ZSPL	B-Language
,	O
Ratfor	B-Language
,	O
PL/1	B-Language
and	O
PLMX	B-Language
.	O
</s>
<s>
Example	O
runs	O
were	O
provided	O
for	O
a	O
variety	O
of	O
machines	O
,	O
mostly	O
Zilog	B-General_Concept
Z80	I-General_Concept
or	O
MOS	O
6502-based	O
.	O
</s>
<s>
The	O
best	O
time	O
was	O
initially	O
16.5	O
seconds	O
,	O
turned	O
in	O
by	O
Ratfor	B-Language
on	O
a	O
4MHz	O
Z80	B-General_Concept
machine	O
,	O
but	O
Gary	O
Kildall	O
personally	O
provided	O
a	O
version	O
in	O
Digital	O
Research	O
's	O
prototype	O
version	O
of	O
PL/1	B-Language
that	O
ran	O
in	O
14	O
seconds	O
and	O
set	O
the	O
mark	O
for	O
this	O
first	O
collection	O
.	O
</s>
<s>
The	O
slowest	O
was	O
Microsoft	O
COBOL	B-Application
on	O
the	O
same	O
machine	O
,	O
which	O
took	O
a	O
whopping	O
5115	O
seconds	O
(	O
almost	O
one	O
and	O
a	O
half	O
hours	O
)	O
,	O
longer	O
even	O
than	O
interpreted	O
languages	O
like	O
BASIC	B-Language
.	O
</s>
<s>
A	O
notable	O
feature	O
of	O
this	O
first	O
run	O
was	O
that	O
C	B-Language
,	O
Pascal	B-Application
and	O
PL/1	B-Language
all	O
turned	O
in	O
a	O
roughly	O
similar	O
performance	O
that	O
easily	O
beat	O
the	O
various	O
interpreters	O
.	O
</s>
<s>
A	O
second	O
set	O
of	O
tests	O
was	O
carried	O
out	O
on	O
more	O
powerful	O
machines	O
,	O
with	O
Motorola	B-Device
68000	I-Device
assembly	B-Language
language	I-Language
turning	O
in	O
the	O
fastest	O
times	O
at	O
1.12	O
seconds	O
,	O
slightly	O
besting	O
C	B-Language
on	O
a	O
PDP-11/70	B-Device
and	O
almost	O
twice	O
as	O
fast	O
as	O
8086	B-General_Concept
assembler	B-Language
.	O
</s>
<s>
Most	O
PDP-11	B-Device
and	O
HP-3000	B-Device
times	O
were	O
much	O
slower	O
,	O
on	O
the	O
order	O
of	O
10	O
to	O
50	O
seconds	O
.	O
</s>
<s>
Tests	O
on	O
these	O
machines	O
using	O
only	O
high-level	O
languages	O
was	O
led	O
by	O
NBS	O
Pascal	B-Application
on	O
the	O
PDP-11	B-Device
,	O
at	O
2.6	O
seconds	O
.	O
</s>
<s>
UCSD	B-Language
Pascal	I-Language
provided	O
another	O
interesting	O
set	O
of	O
results	O
as	O
the	O
same	O
program	O
can	O
be	O
run	O
on	O
multiple	O
machines	O
.	O
</s>
<s>
Running	O
on	O
the	O
dedicated	O
Ithaca	O
Intersystems	O
Pascal-100	O
machine	O
,	O
a	O
Pascal	B-Device
MicroEngine	I-Device
based	O
computer	O
,	O
it	O
ran	O
in	O
54	O
seconds	O
,	O
while	O
on	O
the	O
Z80	B-General_Concept
it	O
was	O
239	O
,	O
and	O
516	O
on	O
the	O
Apple	O
II	O
.	O
</s>
<s>
This	O
version	O
removed	O
most	O
of	O
the	O
less	O
popular	O
languages	O
,	O
leaving	O
Pascal	B-Application
,	O
C	B-Language
,	O
FORTRAN	B-Application
IV	O
,	O
and	O
COBOL	B-Application
,	O
while	O
adding	O
Ada	B-Language
and	O
Modula-2	B-Language
.	O
</s>
<s>
Motorola	B-Device
68000	I-Device
(	O
68k	O
)	O
assembly	O
remained	O
the	O
fastest	O
,	O
almost	O
three	O
times	O
the	O
speed	O
of	O
the	O
Intel	B-General_Concept
8086	I-General_Concept
running	O
at	O
the	O
same	O
8MHz	O
clock	O
.	O
</s>
<s>
Using	O
high-level	O
languages	O
the	O
two	O
were	O
closer	O
in	O
performance	O
,	O
with	O
the	O
8086	B-General_Concept
generally	O
better	O
than	O
half	O
the	O
speed	O
of	O
the	O
68k	O
and	O
often	O
much	O
closer	O
.	O
</s>
<s>
A	O
wider	O
variety	O
of	O
minicomputers	B-Architecture
and	O
mainframes	B-Architecture
was	O
also	O
included	O
,	O
with	O
times	O
that	O
the	O
68k	O
generally	O
beat	O
except	O
for	O
the	O
very	O
fastest	O
machines	O
like	O
the	O
IBM	O
3033	O
and	O
high-end	O
models	O
of	O
the	O
VAX	B-Device
.	O
</s>
<s>
Older	O
machines	O
like	O
the	O
Data	B-Device
General	I-Device
Nova	I-Device
,	O
PDP-11	B-Device
and	O
HP-1000	B-Device
were	O
nowhere	O
near	O
as	O
fast	O
as	O
the	O
68k	O
.	O
</s>
<s>
Byte	O
once	O
again	O
revisited	O
the	O
sieve	O
later	O
in	O
August	O
1983	O
as	O
part	O
of	O
a	O
whole-magazine	O
series	O
of	O
articles	O
on	O
the	O
C	B-Language
language	I-Language
.	O
</s>
<s>
In	O
this	O
case	O
the	O
use	O
was	O
more	O
in	O
keeping	O
with	O
the	O
original	O
intent	O
,	O
using	O
a	O
single	O
source	O
code	O
and	O
running	O
it	O
on	O
a	O
single	O
machine	O
to	O
compare	O
the	O
performance	O
of	O
C	B-Language
compilers	O
on	O
the	O
CP/M	B-Operating_System
-86	I-Operating_System
operating	O
system	O
,	O
on	O
CP/M	B-Application
-80	I-Application
,	O
and	O
for	O
the	O
IBM	B-Device
PC	I-Device
.	O
</s>
<s>
In	O
spite	O
of	O
Gilbreath	O
's	O
concern	O
in	O
the	O
original	O
article	O
,	O
by	O
this	O
time	O
the	O
code	O
had	O
become	O
almost	O
universal	O
for	O
testing	O
,	O
and	O
one	O
of	O
the	O
articles	O
remarked	O
that	O
"	O
The	B-Algorithm
Sieve	I-Algorithm
of	I-Algorithm
Eratosthenes	I-Algorithm
is	O
a	O
mandatory	O
benchmark	O
"	O
.	O
</s>
<s>
New	O
versions	O
of	O
the	O
code	O
continue	O
to	O
appear	O
for	O
new	O
languages	O
,	O
eg	O
and	O
GitHub	B-Application
has	O
many	O
versions	O
available	O
.	O
</s>
<s>
It	O
is	O
often	O
used	O
as	O
an	O
example	O
of	O
functional	B-Language
programming	I-Language
in	O
spite	O
of	O
the	O
common	O
version	O
not	O
actually	O
using	O
the	O
sieve	O
algorithm	O
.	O
</s>
<s>
This	O
is	O
the	O
original	O
BASIC	B-Language
version	O
of	O
the	O
code	O
presented	O
in	O
1981	O
.	O
</s>
<s>
The	O
dialect	O
is	O
not	O
specified	O
,	O
but	O
a	O
number	O
of	O
details	O
mean	O
it	O
does	O
not	O
run	O
under	O
early	O
versions	O
of	O
Microsoft	B-Language
BASIC	I-Language
(	O
4.x	O
and	O
earlier	O
)	O
,	O
among	O
these	O
the	O
use	O
of	O
long	O
variable	O
names	O
like	O
and	O
.	O
</s>
<s>
The	O
lack	O
of	O
line	O
numbers	O
may	O
suggest	O
a	O
minicomputer	B-Architecture
variety	O
that	O
reads	O
source	O
from	O
a	O
text	O
file	O
,	O
but	O
may	O
have	O
also	O
been	O
a	O
printing	O
error	O
.	O
</s>
<s>
And	O
in	O
C	B-Language
,	O
with	O
some	O
whitespace	O
adjustments	O
from	O
the	O
original	O
:	O
</s>
