Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
21
Task/Time-a-function/Raven/time-a-function.raven
Normal file
21
Task/Time-a-function/Raven/time-a-function.raven
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
define doId use $x
|
||||
$x dup * $x /
|
||||
|
||||
define doPower use $v, $p
|
||||
$v $p pow
|
||||
|
||||
define doSort
|
||||
group
|
||||
20000 each choose
|
||||
list sort reverse
|
||||
|
||||
define timeFunc use $fName
|
||||
time as $t1
|
||||
$fName "" prefer call
|
||||
time as $t2
|
||||
$fName $t2 $t1 -"%.4g secs for %s\n" print
|
||||
|
||||
"NULL" timeFunc
|
||||
42 "doId" timeFunc
|
||||
12 2 "doPower" timeFunc
|
||||
"doSort" timeFunc
|
||||
Loading…
Add table
Add a link
Reference in a new issue