2 writeln("running Io tests...")
3 System
system("./ioServer Math/_tests/speed.io > Math/_tests/SpeedResults.txt")
5 writeln("running Python tests...")
6 System
system("python Math/_tests/speed.py >> Math/_tests/SpeedResults.txt")
8 Namespace
:= Object clone(
10 if (thisMessage arguments size
== 0, self setSlot(thisMessage name
, self clone))
14 Languages
:= Object clone
15 Languages
doFile("Math/_tests/SpeedResults.txt")
17 Object foreach := method(
18 self slotNames sort
foreach(slotName
,
19 sender setSlot(thisMessage argAt(0) name
, slotName
)
20 sender setSlot(thisMessage argAt(1) name
, self getSlot(slotName
))
21 sender doMessage(thisMessage argAt(2))
26 <html>
<head>
<title>io - about - speed - ppc</title>
<link rel="stylesheet" href="http://www.iolanguage.com/site.css">
<META HTTP-EQUIV="EXPIRES" CONTENT=0>
</head>
<body>
30 maxResultFor
:= method(testName
,
32 Languages
foreach(langName
, lang
,
33 m
:= lang
getSlot(testName
) asNumber
39 writeln("<br><br><ul>")
40 numberOfLanguages
:= Languages
slotNames size
41 Languages Io
foreach(testName
, testResult
,
42 if (testName
== "version", continue)
43 writeln(testName
, "<p>")
45 tname
:= testName
replace("minus", "-") replace("plus", "+") replace("times", "*")
46 tname
:= tname
replace("Equals", "=")
48 writeln("<table cellpadding=0 cellspacing=1 border=0>")
50 //writeln("<table cellpadding=0 cellspacing=1 border=0>")
52 maxResult
:= maxResultFor(testName
)
54 Languages
foreach(langName
, lang
,
55 if (langName
== "Io") then(
83 r
:= lang
getSlot(testName
) asNumber
84 //w
:= ((r
/maxResult
) * 400)
87 writeln("<table cellpadding=3 cellspacing=0 border=0>")
88 writeln("<tr><td width=50 align=right bgcolor=", bgcolor2
, "><font color=", color
, ">", langName asLowercase
, " </td>")
90 writeln("<td bgcolor=", bgcolor
, " width=", w
, "></td>")
92 writeln("<td><font color=#eeeeee>", r
, "</td>")
97 writeln("</td></tr></table>")
98 //writeln("</ul><br>")
104 writeln("versions<p>")
106 Languages
foreach(langName
, lang
,
107 writeln(langName
, " ", lang version
, "<br>")