I haven't gotten around to setting up a development environment yet to try those C sources but out of curiosity I took a look at that most recent snippet you sent and tried to implement something similar using Pocket Scheme on a Jornada 690
(133 MHz SH3
) and a Hitachi ePlate
(128 MHz SH4
) to see if the latter would have any boost in performance. I ended up with this Scheme procedure to approximate it:
(define (muldiv-loop x y iterations)
(let ((a 0))
(do ((i 0 (+ i 1)))
((= i iterations) i)
(set! a (* x y))
(set! a (/ x y)))
a))
Looping this with x = 1000.0 and y = 2000.0 for 100,000 iterations runs about 20% faster on the SH4
(~7.2s
) than the SH3
(~8.9s
) which is a pretty good boost but it seems to me like you'd see even more if the FPU was being utilized and this from the other architectural enhancements of the SH4, I'm not sure how FP is implemented in Pocket Scheme so it doesn't mean too much as far as whether eVC properly supports it but it's still interesting to take a look at, at least...