wtorek, 24 marca 2015

Forgot to take your sdcard adapter? No worries, you have your phone!

Do you have network access? 


Then we're fine!
ping 10.10.5.160

Install your favorite ssh server

My choice is:

Find-out SD Card device path

ssh shd@10.10.5.160 'mount | grep sdcard'

Unmount your SD Card

ssh shd@10.10.5.160 'umount /dev/block/vold/179:1'

Copy image to SD Card

 dd if=ubuntu-14.04-hdmi-z7010-20140611.img | ssh shd@10.10.5.160 'dd of=/dev/block/vold/179:9'

niedziela, 21 sierpnia 2011

D vtable benchmarking

I just updated michelf vtable benchmarking to D2, and checked DMD stats on my Linux box.


[shd@magdalene vtable-tests]$ uname -o -p -m
x86_64 AMD Phenom(tm) II X2 550 Processor GNU/Linux
[shd@magdalene vtable-tests]$ gdc --version
gdc (GCC) 4.5.1 20100731 (gdc 0.30, using dmd 2.054)
[shd@magdalene vtable-tests]$ dmd
DMD64 D Compiler v2.053
[shd@magdalene vtable-tests]$ gcc -v
gcc version 4.6.1 (GCC)


So, here is the output:
[shd@magdalene vtable-tests]$ ./test-dmd.sh
Compiling...
== Lap 1 of 3; testing 400000000 function calls ==
Static:           2590000 ticks; 1 (base time)
D Class:          3220000 ticks; 1.24324
Standard:         2320000 ticks; 0.895753
Dynamic:          2700000 ticks; 1.04247
Dynamic Indirect: 3220000 ticks; 1.24324
== Lap 2 of 3; testing 400000000 function calls ==
Static:           2580000 ticks; 1 (base time)
D Class:          3220000 ticks; 1.24806
Standard:         2320000 ticks; 0.899225
Dynamic:          2710000 ticks; 1.05039
Dynamic Indirect: 3090000 ticks; 1.19767
== Lap 3 of 3; testing 400000000 function calls ==
Static:           2590000 ticks; 1 (base time)
D Class:          3220000 ticks; 1.24324
Standard:         2320000 ticks; 0.895753
Dynamic:          2710000 ticks; 1.04633
Dynamic Indirect: 3090000 ticks; 1.19305
== 3-lap average; totaling 1200000000 function calls ==
Static: 2586666 ticks; 1 (base time)
D class:        3220000 ticks; 1.24485
Standard:       2320000 ticks; 0.896907
Dynamic:        2706666 ticks; 1.04639
Dynamic Indirect: 3133333 ticks; 1.21134

[shd@magdalene vtable-tests]$ ./test-g++.sh
Compiling...
== Lap 1 of 3; testing 400000000 function calls ==
Static:           1470000 ticks; 1.000000 (base time)
C++:              2400000 ticks; 1.632653
Standard:         2320000 ticks; 1.578231
Dynamic:          2170000 ticks; 1.476190
Dynamic Indirect: 2710000 ticks; 1.843537
== Lap 2 of 3; testing 400000000 function calls ==
Static:           1490000 ticks; 1.000000 (base time)
C++:              2390000 ticks; 1.604027
Standard:         2320000 ticks; 1.557047
Dynamic:          2160000 ticks; 1.449664
Dynamic Indirect: 2710000 ticks; 1.818792
== Lap 3 of 3; testing 400000000 function calls ==
Static:           1480000 ticks; 1.000000 (base time)
C++:              2390000 ticks; 1.614865
Standard:         2320000 ticks; 1.567568
Dynamic:          2150000 ticks; 1.452703
Dynamic Indirect: 2710000 ticks; 1.831081
== 3-lap average; totaling 1200000000 function calls ==
Static:           1480000 ticks; 1.000000 (base time)
C++:              2393333 ticks; 1.617117
Standard:         2320000 ticks; 1.567568
Dynamic:          2160000 ticks; 1.459459
Dynamic Indirect: 2710000 ticks; 1.831081
[shd@magdalene vtable-tests]$ ./test-gdc.sh
Compiling...
== Lap 1 of 3; testing 400000000 function calls ==
Static: 3610000 ticks; 1 (base time)
D Class: 4190000 ticks; 1.16066
Standard: 2450000 ticks; 0.67867
Dynamic: 3090000 ticks; 0.855956
Dynamic Indirect: 3350000 ticks; 0.927978
== Lap 2 of 3; testing 400000000 function calls ==
Static: 3600000 ticks; 1 (base time)
D Class: 4260000 ticks; 1.18333
Standard: 2450000 ticks; 0.680556
Dynamic: 2960000 ticks; 0.822222
Dynamic Indirect: 3350000 ticks; 0.930556
== Lap 3 of 3; testing 400000000 function calls ==
Static: 3600000 ticks; 1 (base time)
D Class: 4120000 ticks; 1.14444
Standard: 2450000 ticks; 0.680556
Dynamic: 3090000 ticks; 0.858333
Dynamic Indirect: 3340000 ticks; 0.927778
== 3-lap average; totaling 1200000000 function calls ==
Static: 3603333 ticks; 1 (base time)
D class: 4190000 ticks; 1.16281
Standard: 2450000 ticks; 0.679926
Dynamic: 3046666 ticks; 0.845513
Dynamic Indirect: 3346666 ticks; 0.92877
 
here is the code