Created
September 10, 2012 16:59
-
-
Save kikuchan/3692138 to your computer and use it in GitHub Desktop.
gauche array-mul simple benchmark
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (use gauche.array) | |
| (define Tarray (array (shape 0 3 0 3) 1 0 0 0 1 0 0 0 1)) | |
| (define sxsy (array (shape 0 3 0 1) 1 1 1)) | |
| (dotimes (y 100) | |
| (display ".")(flush) | |
| (dotimes (x 100) | |
| (array-mul Tarray sxsy))) | |
| (newline) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
.................................................................................................... Profiler statistics (total 408 samples, 4.08 seconds) num time/ total Name calls call(ms) samples ---------------------------------------------------+------+-------+----------- (array-ref ) 220008 0.0060 132( 32%) array-mul 10000 0.0440 44( 11%) generate-amap 10002 0.0180 18( 4%) s32vector-range-check 420000 0.0004 17( 4%) (initialize ) 20004 0.0085 17( 4%) (generate-amap generate-amap) 210000 0.0008 16( 4%) (map-to ) 30006 0.0047 14( 3%) (array-set! ) 30000 0.0047 14( 3%) shape->start/end-vector 10002 0.0120 12( 3%) shape 10002 0.0100 10( 2%) ((map-to ) #f) 30006 0.0030 9( 2%) s32vector-dot 250008 0.0003 7( 2%) ((call-with-builder ) #f) 30006 0.0017 5( 1%) (make ) 20497 0.0024 5( 1%) (call-with-iterator ) 20004 0.0025 5( 1%) vector-ref 220008 0.0002 4( 1%) s32vector-add 210000 0.0002 4( 1%) s32vector 60012 0.0007 4( 1%) ((call-with-builder ) #f #f) 60012 0.0007 4( 1%) (call-with-iterator ) 20004 0.0020 4( 1%) ((call-with-iterator ) #f) 20004 0.0020 4( 1%) s32vector-set! 60012 0.0005 3( 1%) ((call-with-iterator ) #f #f) 40008 0.0007 3( 1%) slot-set! 40008 0.0007 3( 1%) split-at! 30000 0.0010 3( 1%) fold-right 10004 0.0030 3( 1%) make-array-internal 10002 0.0030 3( 1%) class-of 60025 0.0003 2( 0%) ((call-with-iterator ) #f) 40008 0.0005 2( 0%) s32vector-sub 30006 0.0007 2( 0%) (fold-right rec) 30006 0.0007 2( 0%) iota 20004 0.0010 2( 0%) (fold ) 10002 0.0020 2( 0%) pass3/optimize-call 1101 0.0182 2( 0%) ((initialize ) #f) 220008 0.0000 1( 0%) ((call-with-iterator ) #f #f) 60012 0.0002 1( 0%) ((call-with-iterator ) #f) 60012 0.0002 1( 0%) undefined? 50375 0.0002 1( 0%) (shape G106) 40008 0.0002 1( 0%) vector-set! 30012 0.0003 1( 0%) (call-with-builder ) 30006 0.0003 1( 0%) ((map-to ) #f #f) 30006 0.0003 1( 0%) ((initialize ) #f) 30000 0.0003 1( 0%) make-vector 20008 0.0005 1( 0%) (shape->start/end-vector #f) 20004 0.0005 1( 0%) (shape->start/end-vector #f) 20004 0.0005 1( 0%) s32vector->list 10002 0.0010 1( 0%) ((fold ) #f) 10002 0.0010 1( 0%) array-end 10002 0.0010 1( 0%) list->vector 10002 0.0010 1( 0%)