-
Notifications
You must be signed in to change notification settings - Fork 0
/
benchmark.ps1
27 lines (21 loc) · 1.18 KB
/
benchmark.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$minbang = 99999
$minlua = 99999
$thetest='binary-trees'
$thetest='spectral'
$thetest='fannkuck-redux'
$thetest='n-body'
$thetest='multi'
for ($i=0;$i -lt 9;$i++) {
$tbang = (measure-command { .\bang .\samples\$thetest.bang }).totalmilliseconds
$tlua = (measure-command { lua523r .\samples\$thetest.lua }).totalmilliseconds
if ($tbang -lt $minbang) { $minbang = $tbang }
if ($tlua -lt $minlua) { $minlua = $tlua }
echo "bang=$tbang lua=$tlua"
}
echo "minbang=$minbang minlua=$minlua factor=$($minbang/$minlua)"
## (
## ((measure-command { .\bang .\samples\n-body.bang 12000 }).totalmilliseconds / (measure-command { lua523r .\samples\n-body.lua 12000 }).totalmilliseconds) +
## ((measure-command { .\bang .\samples\spectral.bang 150 }).totalmilliseconds / (measure-command { lua523r .\samples\spectral.lua 150 }).totalmilliseconds) +
## ((measure-command { .\bang .\samples\binary-trees.bang 12 }).totalmilliseconds / (measure-command { lua523r .\samples\binary-trees.lua 12 }).totalmilliseconds) +
## ((measure-command { .\bang .\samples\fannkuck-redux.bang 8 }).totalmilliseconds / (measure-command { lua523r .\samples\fannkuck-redux.lua 8 }).totalmilliseconds)
## ) / 4