Performance improvements in Ring 1.21 (GitHub) - 2024.07.15

90 views
Skip to first unread message

Mahmoud Fayed

unread,
Jul 15, 2024, 11:55:45 AM (7 days ago) Jul 15
to The Ring Programming Language
Hello

This is a report about some of the performance improvements in Ring 1.21 (GitHub) - 2024.07.15

Just five days after our previous report and we have good news :D

During these days we updated the way Ring VM manage temp. memory for functions, and improved the code used for handling nested lists.

As a result, the stars3.ring example now works at over 5000 FPS in Ring 1.21 on my machine (instead of 2350 FPS in Ring 1.20 and instead of 4000 FPS in Ring 1.21 Rev. 2024.07.10)

stars_performance.png

Also, the waving cubes example works at 140 FPS (Using RayLib 5.0) and Ring 1.21 
instead of 110 FPS (one week ago)
wavingcubes_performance.png

Note: This sample works at (85 FPS using Python 3.11 and RayLib 4.5 and works at 77 FPS using Python 3.12 and RayLib 5.0 and Works at 81 FPS using Python 3.13 (Beta) and RayLib 5.0) - i.e. Ring 1.21 is faster than Python at the waving cubes sample by a percentage from 65% to 80% 

Note: We ported all of the RayLib samples that we have from RayLib 2.5 to RayLib 5.0 in this folder: ring/samples/UsingRayLib5 at master · ring-lang/ring (github.com)

To be able to using RingRayLib 5.0 
After building Ring using ring/build/buildvc_x64.bat
Follow the next commands
cd ring/extensions/ringraylib5/src
buildvc_x64.bat
cd ../../libdepwin/raylib5_x64/lib
copy *.dll b:\ring\bin

Greetings,
Mahmoud

Mansour Ayouni

unread,
Jul 15, 2024, 4:17:40 PM (7 days ago) Jul 15
to Mahmoud Fayed, The Ring Programming Language
Hello Mahmoud,

Congratulations for these advancements!
Softanza will greatly benefit from them in performance demanding features as observed since the 1.18 release.

Best,
Mansour



--

---
You received this message because you are subscribed to the Google Groups "The Ring Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ring-lang+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ring-lang/12590d7d-0369-47eb-85ce-0bd9e1cbc701n%40googlegroups.com.

Mahmoud Fayed

unread,
Jul 15, 2024, 4:47:30 PM (7 days ago) Jul 15
to The Ring Programming Language
Hello Mansour

>> "Congratulations for these advancements!"

You are welcome :D

>> "Softanza will greatly benefit from them in performance demanding features as observed since the 1.18 release."

By the way if we will compare Ring 1.21 (GitHub) performance and Ring 1.18
We can say the performance of calling C functions is 14x faster (1400%)

Greetings,
Mahmoud 

Mansour Ayouni

unread,
Jul 16, 2024, 4:32:49 AM (6 days ago) Jul 16
to Mahmoud Fayed, The Ring Programming Language
Hello Mamoud,

Nice to know it.

With this orientation, I'm confident that Ring can tackle domains like data analytics and machine learning with reasonable performance, approaching or even exceeding Python.

In this case, we will not be limited, as Ring programmers, by the conventional applications development domain, but aspire to bring solutions to other interesting needs.

All the best,
Mansour

MOHANNAD ALDULAIMI

unread,
Jul 16, 2024, 10:24:58 AM (6 days ago) Jul 16
to The Ring Programming Language
Hello Mahmoud, Mansour
Thanks for this great improvements in performance 

I'm asking about what will be different in the performance tips after these updates?! :https://ring-lang.github.io/doc1.20/performancetips.html

Mansour I'm exciting to test softanzalib after this improvements , because it was loaded during 2 seconds in an old device !

By the way, One year ago I was working in a (Data analysis project) for "Mosul university" witch was working in (ring 1.18-1.19) and know it is working on ring1.21 as expected fast
and here is the the compatibility challenge...:D
I'm glad to be one of ring programmers :D

Best wishes....
Mohannad   

Mahmoud Fayed

unread,
Jul 16, 2024, 11:19:48 AM (6 days ago) Jul 16
to The Ring Programming Language
Hello Mohannad

>> "Thanks for these great improvements in performance "

You are welcome :D

>> "I'm asking about what will be different in the performance tips after these updates."

This chapter will be revised and updated before the release date.

>> "By the way, One year ago I was working in a (Data analysis project) for "Mosul university" witch was working in (ring 1.18-1.19) and know it is working on ring1.21 as expected fast"

Good news, Thanks for sharing :D

Greetings,
Mahmoud

Mansour Ayouni

unread,
Jul 16, 2024, 12:58:29 PM (6 days ago) Jul 16
to Mahmoud Fayed, The Ring Programming Language

Hello Mohannad,

I'm happy to hear that you've used Ring in a university setting for a data analytics project. When Softanza is released, it will significantly aid in this area.

Softanza startup time has been dramatically improved after implementing some fixes proposed by Mahmoud. It now takes only 0.10 seconds on my machine (Windows, Intel i7 2.95GHz, and 16GB of RAM).

The Softanza files themselves take just half of that time (0.05 seconds), while the other half is used by the required Ring libraries, mainly lightguilib.ring, which takes 0.04 seconds.

I should find a way to load only the Qt classes used in Softanza, which would reduce the library loading time to just 0.05 seconds. I'll be asking Mahmoud for help with this in a separate post.

By the way, how is your Dragon web framework project going? I hope it's progressing well.

All the best, Mansour


Bert Mariani

unread,
Jul 16, 2024, 1:57:31 PM (6 days ago) Jul 16
to The Ring Programming Language
Hello Mahound et ALL

These are my steps and results on my HP-i5
Even Faster than Before !!!
Keep implementing those C routines and updating Ring VM.

===================
cd c:\ring
c:\ring> git stash

  ...updates

c:\ring> git pull    
  ... updates

===================
c:\ring>
c:/ring/build/buildvc_x64.bat  


===================
c:\ring> cd c:/ring/extensions/ringraylib5/src

c:\ring\extensions\ringraylib5\src>
buildvc_x64.bat    

===================
cd ../../libdepwin/raylib5_x64/lib

c:\ring\extensions\libdepwin\raylib5_x64\lib>
c:\ring\extensions\libdepwin\raylib5_x64\lib> copy *.dll c:\ring\bin  

raylib.dll
Overwrite c:\ring\bin\raylib.dll? (Yes/No/All): All <<<
        1 file(s) copied.

===================
Ring NotePad  -- Started GUI

C:/ring/samples.UsingOpenGL/stars3.ring

Newest Speed   New Speed     Old Speed  
FPS : 1555     FPS : 1290    FPS : 1028
FPS : 2084     FPS : 1314    FPS : 975  
FPS : 2058     FPS : 1323    FPS : 956  
FPS : 2172     FPS : 1393    FPS : 1028
FPS : 2112     FPS : 1723    FPS : 1059
FPS : 2157     FPS : 1751    FPS : 903  
FPS : 2245     FPS : 1769    FPS : 967  
FPS : 2197     FPS : 1733    FPS : 1071
FPS : 2078     FPS : 1731    FPS : 1068
FPS : 2076     FPS : 1751    FPS : 1000
FPS : 2159     FPS : 1798
FPS : 2183     FPS : 1728
FPS : 2099     FPS : 1732
FPS : 1956     FPS : 1779
FPS : 2036     FPS : 1696

===================
C:/ring.samples/UsingRayLib5/more/ex5_wavingcubes_threads.ring

Speed:  170-185 FPS  
OLD           50-57  FPS
   
===================

Mahmoud Fayed

unread,
Jul 16, 2024, 2:13:49 PM (6 days ago) Jul 16
to The Ring Programming Language
Hello Bert

>> "Even Faster than Before !!!"

This is very nice, Thanks for sharing :D

>> "Newest Speed   New Speed     Old Speed  "

Nice comparison table to demonstrate the progress

>> "Speed:  170-185 FPS  
OLD           50-57  FPS"

This is over three times faster, because of Ring VM improvements and using RayLib 5.0 instead of RayLib 2.5

Greetings,
Mahmoud 


Mahmoud Fayed

unread,
Jul 16, 2024, 2:15:20 PM (6 days ago) Jul 16
to The Ring Programming Language
Hello Bert

>> " This is over three times faster, because of Ring VM improvements and using RayLib 5.0 instead of RayLib 2.5"

Here I mean (over two times faster - not three)

Greetings,
Mahmoud

Reply all
Reply to author
Forward
0 new messages