[Numpy-discussion] fortran vs numpy on mac/linux - gcc performance?

2009-10-19 Thread Robin
Hi, I have been looking at moving some of my bottleneck functions to fortran with f2py. To get started I tried some simple things, and was surprised they performend so much better than the number builtins - which I assumed would be c and would be quite fast. On my Macbook pro laptop (Intel core 2

Re: [Numpy-discussion] fortran vs numpy on mac/linux - gcc performance?

2009-10-19 Thread Robin
Forgot to include the fortran code used: jm-g26b101:fortran robince$ cat test.f95 subroutine bincount (x,c,n,m) implicit none integer, intent(in) :: n,m integer, dimension(0:n-1), intent(in) :: x integer, dimension(0:m-1), intent(out) :: c integer :: i c = 0 do i = 0,