mirror of
https://github.com/zekexiao/pocketlang.git
synced 2025-02-06 04:37:47 +08:00
b285336895
and the benchmark script refactored, and now it will generate an html report
17 lines
246 B
Plaintext
17 lines
246 B
Plaintext
|
|
## Run the script in pocketlang with
|
|
## toc enabled VS toc disabled
|
|
|
|
from lang import clock
|
|
|
|
N = 20000
|
|
|
|
def woo(n, acc)
|
|
if n == 0 then return acc end
|
|
return woo(n-1, acc + '!')
|
|
end
|
|
|
|
s = clock()
|
|
print(woo(N, ''))
|
|
print('elapsed:', clock() - s)
|