We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Small Basic super slow ??
#15
This version (XXMZ135.000-0) uses LDFastArray - which is still not an optimal container with overheads.

On my PC using 50x50 and 10% initial fill, your original model takes about 106s, the modification above is about 55s, and if I comment out AffichageTableau then it takes about 12s.  Still very slow compared to a native program that doesn't have the inherent overheads of SB, but we start to learn where the performance can be gained.  Would we have learned this if we just accepted the run time of 1s - maybe I could write some carefully optimised GPU code and do it in 1ms, or with fancy GPU 1us.

PS - My basic code in C++ runs in about 12 ms for the same 50*50 , 10% case using your algorithm with no parallelisation or special vectorisations (also no visualisation), which is maybe comparable to the QB64 that I believe converts the source to C++ source and compiles that.

In the C++ parallelisation overheads don't help for such a small problem, if I do a 1000x1000 10% for 500 steps with and without parallelisation on my PC it is 0.5s and 4.2sec.
Reply


Messages In This Thread
Small Basic super slow ?? - by Elzaimer - 06-04-2025, 08:39 PM
RE: Small Basic super slow ?? - by martmen - 06-05-2025, 12:46 AM
RE: Small Basic super slow ?? - by litdev - 06-05-2025, 03:38 PM
RE: Small Basic super slow ?? - by Elzaimer - 06-05-2025, 05:44 PM
RE: Small Basic super slow ?? - by litdev - 06-05-2025, 07:04 PM
RE: Small Basic super slow ?? - by z-s - 06-06-2025, 03:14 AM
RE: Small Basic super slow ?? - by litdev - 06-07-2025, 03:05 PM
RE: Small Basic super slow ?? - by litdev - 06-07-2025, 03:48 PM
RE: Small Basic super slow ?? - by Elzaimer - 06-07-2025, 07:32 PM
RE: Small Basic super slow ?? - by litdev - 06-08-2025, 07:31 AM
RE: Small Basic super slow ?? - by litdev - 06-08-2025, 10:35 AM
RE: Small Basic super slow ?? - by z-s - 06-08-2025, 02:42 PM
RE: Small Basic super slow ?? - by litdev - 06-08-2025, 03:29 PM
RE: Small Basic super slow ?? - by litdev - 06-08-2025, 04:04 PM
RE: Small Basic super slow ?? - by Elzaimer - 06-08-2025, 08:21 PM
RE: Small Basic super slow ?? - by litdev - 06-09-2025, 08:45 AM
RE: Small Basic super slow ?? - by Elzaimer - 06-10-2025, 04:33 PM
RE: Small Basic super slow ?? - by litdev - 06-10-2025, 05:10 PM
RE: Small Basic super slow ?? - by Elzaimer - 06-10-2025, 07:21 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)