Hello
Ring as a language is designed for freedom (Any Syntax/Paradigm/Platform), productivity (Developing DSLs in short time, small number of data types, Tools, many libraries, etc.) and being lightweight (Small implementation with respect to Compiler/VM C code) and using a memory management model that's more predictable.
But I know from long time ago that we need to improve Ring performance, and this would help in using the language in more tasks. I delayed investing long time in performance improvements to be sure that we have a stable product in the first place, while using the language in my projects and getting real experience that guide the development. PWCT2 is an example about a project developed using Ring and helped me to direct its design.
Now since I am happy with Ring as a language, it's the time to go and invest more time in Libraries, Tools & Improving performance. The next release of Ring is a step in this direction and comes with the next performance improvements.
(1) For loops is three times (3x) faster - This is enough to finish a loop from 1 to 100,000,000 in 1 second on my machine.
(2) Calling Ring functions is two times (2x) faster
(3) Calling C functions (Ring extensions) is three times (3x) faster
(4) Calling Methods using the dot operator is (2x) faster
(5) Calling Methods using braces is (3x) faster
(6) Reducing memory used by Ring Items/Item structures
As a result of these improvements, The Game/Graphics examples that are based on calling C functions are (2x to 3x) faster.
For example, The stars3.ring example works at 2000FPS instead of 500FP
The Levels of cubes example, works at 200FPS instead of 64FPS
The Level of cubes example that uses RayLib works at 3000 FPS instead of 1000FPS
I fell the speed in most examples/applications.
These updates are inspired by the work of Illir Liburn on Ring2A and Ring2B projects.
More performance improvements will come in each new release of Ring
Also, supporting real arrays (instead of lists) as suggested by Bert Mariani is on my to-do list. I have many ways to do this, I am just spending more time to match the feature with the language spirit and original design (And good ideas are coming).
Thanks to the team, and everyone who is using Ring and trust the development process.
Greetings,
Mahmoud