1
1
mirror of https://github.com/jarun/nnn.git synced 2024-11-26 09:52:12 +03:00

Updated Performance (markdown)

Mischievous Meerkat 2019-11-22 18:23:31 +05:30
parent dff70359be
commit 4e216fdc0b

@ -115,4 +115,43 @@ $ time strace -c ls -l /usr/bin | wc -l
1989
```
**Note:** Each reading is taken at cold boot.
**Note:** Each reading is taken at cold boot.
## C vs. other languages
- Python3 vs. C gcc [benchmarks](https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/python3-gcc.html)
- Go vs. C gcc [benachmarks](https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/go-gcc.html)
- Bash script vs. C gcc
```
/* compare.c */
int main(void)
{
for (int i = 0; i < 1000000; i++)
printf("hello\n");
return 0;
}
$ time -p ./compare
real 1.89
user 0.20 <<
sys 1.25
---------------------------------
# compare.sh
#!/bin/bash
for (( i = 0; i < 1000000; i++ ))
do
echo hello
done
exit 0
$ time -p ./compare.sh
real 5.88
user 4.66 <<
sys 1.21
```