[ prog / sol / mona ]

prog


The Main Difference Between Symta and Python

1 2024-08-14 17:04

https://lj.rossia.org/users/nancygold/192317.html

<code>$ time ./symta.exe -e 'I 0; while I < 100000000: ++I; say I'
100000000
No
real 0m 1.40s
user 0m 0.14s
sys 0m 0.00s

$ time python -c "i = 0; [i := i+1 for _ in range(100000000)]; print(i)"
100000000
real 0m 6.31s
user 0m 1.25s
sys 0m 0.71s

$ time ./symta.exe -e 'I 0; while I < 1000000000: ++I; say I'
1000000000
No
real 0m 13.74s
user 0m 9.20s
sys 0m 0.01s

$ time python -c "i = 0; [i := i+1 for _ in range(1000000000)]; print(i)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<string>", line 1, in <listcomp>
MemoryError
Command exited with non-zero status 1
real 0m 10.72s
user 0m 4.00s
sys 0m 1.43s</code>

2 2024-08-14 17:10

You know nothing about efficient and robust Python!!!
$ time python -c "i = 0; exec('for _ in range(1000000000): i += 1'); print(i)"
1000000000
real 0m 43.65s
user 0m 5.06s
sys 0m 0.01s

3 2024-08-15 17:16 *
$ time python -c 'print(1000000000)'
1000000000

real	0m0,024s
user	0m0,014s
sys	0m0,010s
4 2024-08-16 16:29 *

"Symta" is shit. YWNBAW.

5


VIP:

do not edit these