[ubuntu-uk] Building Ubuntu for the Raspberry Pi, on the Raspberry Pi

Alan Bell alanbell at ubuntu.com
Wed Nov 13 13:51:05 UTC 2013


yeah, I was using a slightly fancy SLC SD card. I would expect bash to 
be faster, it has way less to do, however 0.4 seconds is not 2-3 seconds.

Alan.

On 08/11/13 17:03, Tyler J. Wagner wrote:
> Twice that, on a class 10 SD card:
>
> root at raspberrypi:~# cat > hello.py
> print "Hello, World!"
> root at raspberrypi:~# time python hello.py
> Hello, World!
>
> real	0m0.443s
> user	0m0.140s
> sys	0m0.090s
>
> But it could just be a slow filesystem. Running it repeatedly, it's faster:
>
> root at raspberrypi:~# time python /root/hello.py
> Hello, World!
>
> real	0m0.223s
> user	0m0.180s
> sys	0m0.010s
>
> And using a tmpfs is equally fast:
>
> root at raspberrypi:~# mkdir /tmp/test
> root at raspberrypi:~# mount -t tmpfs -o size=20m tmpfs /tmp/test
> root at raspberrypi:~# cp hello.py /tmp/test/
> root at raspberrypi:~# time python /tmp/test/hello.py
> Hello, World!
>
> real	0m0.205s
> user	0m0.180s
> sys	0m0.020s
>
> However, bash is WAY faster:
>
> root at raspberrypi:~# echo 'echo "Hello, World!"' > hello.sh
> root at raspberrypi:~# time bash hello.sh
> Hello, World!
>
> real	0m0.021s
> user	0m0.000s
> sys	0m0.010s
>
> Regards,
> Tyler

-- 
I work at http://libertus.co.uk




More information about the ubuntu-uk mailing list