Still no reply from cm_gui, he must have googled "C hello world"
I must be mad for doing this - but I feel so strongly
about this topic. In 99.9% of cases generally things
are "feast enough"! So here goes:
jmills@atomant:~$ cat - > hello.c
int main (int argc, char ** argv) {
printf("Hello World!\n!");
}
jmills@atomant:~$ tcc hello.c -o hello
jmills@atomant:~$ wc -l hello.c
3 hello.c
jmills@atomant:~$ ls -l hello.c
-rw-r--r-- 1 jmills jmills 69 2008-12-17 08:41 hello.c
jmills@atomant:~$ ls -l hello
-rwxr-xr-x 1 jmills jmills 2972 2008-12-17 08:41 hello
jmills@atomant:~$ time ./hello
Hello World!
!
real 0m0.003s
user 0m0.000s
sys 0m0.004s
jmills@atomant:~$ cat - > hello.py
print "Hello World!"
jmills@atomant:~$ time python hello.py
Hello World!
real 0m0.129s
user 0m0.016s
sys 0m0.020s
OMG OMG OMG! Python is slower!
If you compare "sys" times ~5x slower!
BUT ... This is in fact a misleading as most of
this is in the startup time. So let's be fairer:
jmills@atomant:~$ time python -E -S hello.py
Hello World!
real 0m0.011s
user 0m0.008s
sys 0m0.004s
Wow! Only ~2x as slow as C.
--JamesMills
PS: Yet another useless post!