Hi Zelphir, > ... > Now, using Guile-CV, on my relatively slow laptop (i5-2450M CPU @ 2.50GHz × 4 - 6GB > RAM): > scheme@(guile-user)> ,use (cv) > scheme@(guile-user)> (im-make 1000 1000 1) > $5 = (1000 1000 1 (#f32(0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 > 0.0 # …))) > scheme@(guile-user)> ,time (im-transpose $5) > $6 = (1000 1000 1 (#f32(0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 > 0.0 # …))) ;; 0.342220s real time, 0.367022s run time. 0.040217s spent in GC. > > scheme@(guile-user)> (im-make 1000 10000 1) > $7 = (1000 10000 1 (#f32(0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 > 0.0 # …))) > > scheme@(guile-user)> ,time (im-transpose $7) > $8 = (10000 1000 1 (#f32(0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 > > 0.0 # …))) ;; 3.186683s real time, 3.374562s run time. 0.303187s spent in GC. > > But I see that im-transpose still is pure scheme code, I'll write the low level > operation in C and post back ... I moved the im-transpose core functionality to libguile-cv, and now I get these results (roughly 22x faster): scheme@(guile-user)> ,use (cv) scheme@(guile-user)> (im-make 1000 1000 1) $2 = (1000 1000 1 (#f32(0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 # …))) scheme@(guile-user)> ,time (im-transpose $2) $3 = (1000 1000 1 (#f32(0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 # …))) ;; 0.027255s real time, 0.035129s run time. 0.014336s spent in GC. scheme@(guile-user)> (im-make 1000 10000 1) $4 = (1000 10000 1 (#f32(0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 # …))) scheme@(guile-user)> ,time (im-transpose $4) $5 = (10000 1000 1 (#f32(0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 # …))) ;; 0.141708s real time, 0.147565s run time. 0.024564s spent in GC. Note that if yo plan to 'play with' Guile-CV (and expect the above last figures): (a) you have to install form the source and check the devel branch (didn't merge to master yet and do not plan to release soon); (b) make sure you read the 'Configuring Guile for Guile-CV' before you even start ... Cheers, David