Performance Optimization in newer versions of Ring

24 views
Skip to first unread message

Mansour Ayouni

unread,
Jun 19, 2024, 7:18:05 AMJun 19
to The Ring Programming Language
Hello Mahmoud,

I notice this fact by observing the difference in performance between older and new Ring (say between 1.14 (and maybe 1.17), and 1.9 and later:

When a code contains two function calls, for example, the sum of performance measured to each call apart is lesser than the performance of the hole code.

Here is one of dozens of examples that illustrate this in SoftazaLib:

image.png

While the first call costs 0.04s and the second one costs 0.14 seconds, the total execution time is 0.14s and not 0.18s.

Of course, this is an excellent thing! and more gains are observed when working on large strings.

My question is whether this is a literal side effect or something you planned for, internally, when working on the performance goal in Ring 1.19 and + ?

All the best,
Mansour

Mansour Ayouni

unread,
Jun 19, 2024, 7:21:12 AMJun 19
to The Ring Programming Language
Sorry for the mistake, corrected with a different color...

---------- Forwarded message ---------
From: Mansour Ayouni <kalid...@gmail.com>
Date: Wed, 19 Jun 2024 at 12:17
Subject: Performance Optimization in newer versions of Ring
To: The Ring Programming Language <ring...@googlegroups.com>


Hello Mahmoud,

I notice this fact by observing the difference in performance between older and new Ring (say between 1.14 (and maybe 1.17), and 1.9 and later:

When a code contains two function calls, for example, the sum of performance measured to each call apart is higher than the performance of the hole code.

Mansour Ayouni

unread,
Jun 19, 2024, 8:24:37 AMJun 19
to Irwin Rodriguez, The Ring Programming Language
Hello Irwin,

You are right, I never thought of that. Thank you for the suggestion.

PS: I replied to all the groups so everyone could benefit from the discussion.

Best,
Mansour

On Wed, 19 Jun 2024 at 12:40, Irwin Rodriguez <rodrigu...@gmail.com> wrote:
Hi Monsour,

Is that a single-step execution? In that case the result of the execution may not be accurate. You would need to perform multiple executions (30-50) to get the average and also calculate the standard deviation. That way you would get a more approximate value about the performance of your algorithm.


regards.

--

---
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/CAFdCj1AyVuvZPk6E8gms-CBLJG1JBvd1EX3h8gE0hR_GLbUn9w%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages