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 ??
#21
LitDev,

Thank you very much for the instructive example.  Shy
Reply
#22
Google made wwwBASIC (for Node.js and web) but syntax is Dartmouth BASIC-like, which makes it confusing.
Reply
#23
Smile 
I had thought about this optimization, but I figured it would flicker more, and it does.

We should create the image of the next frame without displaying it, and then replace the image of the current frame with this new image...
That way, the display wouldn't be showed during the tests.
It would be prettier because it would be instantaneous.
Is this feasible?

I'm not sure I'am clear  Smile
Reply
#24
You are clear - since we are looking for speed, in the last example I gave (DKJX394.000-0) I use the extension command to Pause graphical updates (LDGraphicsWindow.PauseUpdates and LDGraphicsWindow.ResumeUpdates) while the drawing is being done - this significantly reduces flicker as it only updates the visual GW after all the changes have been made.  Its not perfect, but with SB we are crafting 'the best we can!" which for me as I said is half the fun.  

Also I changed the logic so we do the life calculations only considering the alive cells, not wasting so much time on the dead regions - combined these are optimisations give reasonable performance, not compared to native C++ code for example, but good for SB.
[-] The following 1 user Likes litdev's post:
  • stevantosic
Reply
#25
I started to study your DKJX394.000-0 version which is amazingly fast ! ?
But at this time I don't understand everything.
I keep trying to understand !
Thanks a lot for all your help
Reply
#26
Hi all.  Shy

Tell me please, do you know of any changes to the rules of the game "Life" that would create new incredible effects?
Perhaps this is no longer related to the birth/death of a cell.
Perhaps this is the emergence of some kind of "computational structure" in a homogeneous environment.

It is even possible that some kind of "neural network" could develop that receives input from the leftmost column of cells and produces output in the cells of the rightmost column.  Rolleyes

It would be interesting to try.
Reply
#27
I have an interesting option if I turn the cell into a universal logical element.  Rolleyes
Depending on the code assigned to a cell, the cell can operate as an AND, OR, or NOT logic element.
In addition, the cell can operate in the mode of a simple signal conductor, without processing it.

The cell mode code determines the state of the cell sides.
Each cell face can operate in "input", "output" or "off" mode.

Thus, in a homogeneous environment consisting of cells with such properties, we can create any logical circuits.  Cool

This scheme can be changed by simply changing the operating mode code of each cell.
Therefore, such a circuit can improve itself if a program for controlling the operating mode of the cells is added to it.
Reply
#28
(06-08-2025, 08:15 AM)AbsoluteBeginner Wrote:
(06-07-2025, 07:32 PM)Elzaimer Wrote: ...
- small Basic : 227 sec
- QB64 : 1.1 sec 

This is a hudge difference !?

(translated by Google translator)

Hello, Elzaimer  Shy

Yes, it is a huge difference.
But starting to learn programming using Small Basic is many times easier than using QB64.
The "Aliases" that can be used in SB-Prime allow a person to write code using THEIR NATIVE LANGUAGE (!!!).
The value of this ability is far greater than any difference in performance.
Many people on the planet are forced to make their choice: either they program EASILY and slowly, or they do NOT program at all.

There are many fast and complex programming languages.
But Small Basic, enhanced by the advantages of the SB-Prime editor and extensions - people have only one!

Glory to this Small Basic and its creators!!!

Hooray!..  Smile

Don't worry, I'm making an application that is very similar to Flash and it can program stuff with Small Basic, it's made in JavaScript, which could make it blazingly fast (I became a JavaScript mastermind by the way so I'm backing Small Basic with this)
[-] The following 1 user Likes sm4llprogrammer2008's post:
  • AbsoluteBeginner
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)