I was trying to solve this problem, with X11Basic my code ran in 33s which is too slow. I tried both of these methods:
xbasic solution.bas
xbc solution.bas && ./b.out
Then I switched to FreeBasic, my code was blazing fast! (ran in 0.1s)
I had the same experience with GNU Octave, my code was so slow; then I realised it is because in Octave, matrices are used to store data and it is generally slow with for loops.
So is this a bug? Or is it intended like Octave?
I was trying to solve [this problem](https://projecteuler.net/problem=10), with X11Basic [my code](https://www.ideone.com/D27kRi) ran in **33s** which is too slow. I tried both of these methods:
```
xbasic solution.bas
xbc solution.bas && ./b.out
```
Then I switched to FreeBasic, [my code](https://www.ideone.com/YeQqnF) was blazing fast! (ran in **0.1s**)
I had the same experience with GNU Octave, my code was so slow; then I realised it is because in Octave, matrices are used to store data and it is generally slow with ```for``` loops.
So is this a bug? Or is it intended like Octave?