5 ms·
Here's the summation problem in Fortran, quite succinct, IMO: real, dimension(30000000) :: a call random_number(a) print *, sum(a) That's 30 mil
by eric_t 15y ago
Here's the summation problem in Fortran, quite succinct, IMO:
real, dimension(30000000) :: a
call random_number(a)
print *, sum(a)
That's 30 million doubles, takes 0.04s on my machine.
- kaffiene 15y agoWhich is how long the Java solution took on my machine. Which can't be right, because Java is wrong whatever the question is.