PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

PPL vs others!

In the last few days, I have been doing some benchmark tests to see how PPL would compare with some other development tools. I have tested with a simple code that looks like this in C.

Code:
int i = 0;
unsigned long t = GetTickCount();
while (GetTickCount() - t <= 10000)
i = i + 1;
printf("Iterations per second : %f", (float)i / 10);


Here are the results (on a P4 2.8ghz):

PPL (PC): 2,564,351 or 4,150,694 with i$++
Visual Basic (PC): 1,619,692
Ch Interpreter (PC): 138,822
DarkBasic Trial (PC): 1509
VBScript (PC): 622,406
SmallBasic (PC): 665,431
Tcl (PC): 296,621
Python (PC): 439,214
Perl (PC): 2,229,761
Lua (PC): 2,597,031
RealBasic (PC): 4,983,442.90

PPL (PPC): 199,567 or 275,546 with i$++
NS/Basic (PPC): 25,456
PocketC (PPC): 34,952
Visual C (PPC): N/A
Lua (PPC): 226,726

Languages with binary codes compilers:

Visual C (PC): 97,759,839
Pocket C# (PC): 79,000,000

Pocket C# (PPC): 501,000

As you can see PPL dominates pretty much over all of them but obviously it cannot compete with languages with true compilers!

This test was not intented to start a flame war of any kind, it was made as a personal reference and I decided to share the experience with the rest of you.
I have tried emailing you but have not heard back for weeks so I guess I will post.

What processor are you using for your PC benchmarks?

Some may want to compare the .NET benchmarks.

PPC (400 Mhz) ~501,000/sec
PC (2.8 GhZ) ~42,000,000/sec

I know some developers that have abandoned the idea of PPL after Pocket C# was released.

Right now I am trying to find the fastest/enjoyable language to put my time into. Though I have been spending a lot of time with C#, I would be willing to take a small detour with PPL. If you have another spot for beta testing, I will be glad to test it out for a little bit. Also, with my brief searching, I can't find any documentaion of the language.

Thanks
I use a 2.8 P4 Intel processor here at home, all benchmarks were done on it. Thanks for the C# numbers. C# obviously compiles to machine code. It is not an interpreted language but it's good to have the numbers, just like Visual C.

Did you benchmarked Pocket C# ? That would interesting. I never tried Pocket C#. I am not a real .NET fan to tell the truth. So far Pocket C# is still hard to use and cannot be compared with PPL. I have no doubt that it will become easier to use with time though.

Check http://ppl.arwen.com you will find the manual for PPL there, it is a big outdated though but will give you a good idea.

The next beta release of PPL will be open to everyone.
Thanks for the response.

At your request I wrote and compiled completely in Pocket C#. The code:

class Class1
{
static void Main()
{
long iterations = 0;
long Start = Environment.TickCount;

do
{
iterations++;

}while (Environment.TickCount - Start < 10001);

Console.WriteLine("Iteration/sec " + (iterations/10)); string me = Console.ReadLine();
}
}

*****Results: Iteration/sec 507,506

I know this is not a forum for C# so I won't bore you with more C# info. Please excuse me. :)

I was just looking and it looks like there is a beta up right now 0.8. Is this one I may try out?

PS. If you have any questions about the above code or my benchmark results, feel free to contact me at:
mmtbb @ hotmail . com
Was your first C# here with

iterations = iterations + 1;

or

iterations++;

I only test with the first line of code. Like I've told you in my email, I won't test with ++. With ++ PPL does about 190,000.

Can you test with iterations + 1 and let me know what you got?
Some new numbers:

Tcl (PC): 296,621
Python (PC): 439,214
Perl (PC): 2,229,761

I am quite impressed by the speed of Perl. They did a nice job.
If you are refering to C#. Yes I have tested both:
iterations = iterations + 1; // 507,000

AND

iterations++; // 504,000

In C# they both return the practically the same benchmarks
Ok thanks. C# just like C/C++ is optimizing i = i + 1 to i++.

What if you try it with

iterations = iterations + 2;

This should fool the optimizer not to convert it, leading to better comparision with the benchmark we are doing here.

Then divide your result by 10 and by 2.
i=i+2 still produces 501,000 iterations/sec
on my desktop however, I must have had a lot of stuff running, because on a fresh restart it is giving me ~79,000,000 consistantly which is pretty close to C.
Ok, then, I will update the results on the first post.

Thanks for your time.
Here is a new result:

Lua (PC): 2,597,031

Pretty good speed.
Hello,

Here is the result with lua for pocketpc on my iPaq 2210:

226726 iteration per second.
Very good speed as well.
Can you show me the code you have used and maybe a copy of the .exe for lua?

That is good speed indeed!
berwan03 · 05 Oct 2004, 18:54 UTC — PPL vs others
Here is the code I used to test with lua on pocketpc.

Code:
local i = 0;
local t = os.clock();
while (os.clock() - t) <= 10 do
i = i + 1;
end
print("Iterations per second : %f", i / 10);

I also sent to your hotmail address 'lua.exe' for pocketpc.
But you will also need to download pocket CMD (command prompt for pocketpc) from http://www.symbolictools.de/public/pocketconsole/download.htm
Regards
Berwan
New results from RealBasic 5.5.3 demo.
Curious.. any benchmarks from Java for comparison?
Smok Wawelski · 20 Mar 2005, 02:53 UTC
Hi,

I've done a small test in... Macromedia Flash MX :) (AKA Flash 6) (interpreted bytecode).

Athlon XP 2500+

code:
Code:

t = getTimer();
while ((getTimer() - t) <= 1000) {
i = i + 1;
}
trace("Iterations per second : "+ i);
i = 0;


about 84000 iterations

with i++: 95000

Tomorrow I'll check Java 1.5 (Tiger) and send results and flash 6 player on 400Mhz ARM
Smok Wawelski · 20 Mar 2005, 13:52 UTC
Java benchmark, console application, JDK 1.5.0.01:
(on Athlon 2500+ XP)

Code:

import java.awt.*;
import java.util.*;

class javatestspeed
{
public static void main(String args[])
{
int i = 0;
long t = System.currentTimeMillis();
while (System.currentTimeMillis() - t <= 10000)
{
i = i + 1;
//i++;
}
System.out.println("Iterations per second " + i / 10);
}
}


with i = i + 1: 12,372,875
with i++ : 12,348,473
with i = i + 2 : 12,281,583

I'm afraid there's one thing we did not think about: function getTime() - it may interfere with pure incrementations. Let's say we have a very fast environment but a slow getTime function and slower environment with very fast getTime... how to intepret such a result?
Smok Wawelski · 20 Mar 2005, 13:58 UTC
Qtek 2020, ARM 263 @400Mhz, flash player 6 with ZINC V2:

Code:

t = getTimer();
while ((getTimer() - t) <= 1000) {
i = i + 1;
}
trace("Iterations per second : "+ i);
i = 0;


The result: 5000-6000 (ONLY!!!).
Java is quite fast! Wow. Does anyone know if this is JIT compiler?

I would also like to know if there are any java source code anywhere?
Smok Wawelski · 20 Mar 2005, 18:33 UTC
JDK 1.5 (Tiger) comes with highly optimized JIT compiler called Hotspot. There's also a bunch of other JIT:

http://www.geocities.com/marcoschmidt.g ... ilers.html

or try http://www.google.pl/search?hl=pl&q=jav ... gle%21&lr=

I'm afraid, there's no Java source available (yet). But look at Waba/Superwaba sources, they come with source code (waba for sure).

Do you want any other benchmarks? I could do BlitzBasic (PC) and Superwaba (PC & PPC) tests :)
Why not, more is better! :)
Updated the numbers from the latest version of PPL. The PPC version of PPL is quite a bit faster.
Updated the PPC values again. These tests were done using the latest release of PPL with the new integreated optimizer.
I just noticed that my mother's 2.8 Ghz celeron runs PPL games at 1300 fps. My AMD 2800+ does 630 fps. It seems like it was faster in the past. any sugestions as to the slowness?
Ahh haaa! I figured it out! I switched from 32 bit color to 16 bit on the desktop. It went from 630 fps to 5333 fps. That's more like it!
Can the runtime switch to 16 bit colour if it detects 32bit on the desktop? This was a problem that lots of older Win games ran into, not sure what causes it though.
Right now the runtime is 16bits by default. I will take a look to see why it is not switching to 16bits while changing resolution.
Zibx · 15 Jan 2006, 10:14 UTC — Idea
I'va got an idea — not to use gettime function so often, but use it in start, after that use code like:
Code:
for(a$=0;a$<1000000;a$++)
i$=i$+1;

and after that display the difference betwen current time, and first one.

P.S. sorry, i don't know the syntax of cycles in your language (I here only the first day).
P.P.S. sorry for my english, it's not my first language =)
P.P.P.S. I can help to write documentation on russian
Yep this would be a better test.

I will try this:

Code:
int i = 0;
unsigned long t = GetTickCount();
while (i <= 1000000)
i = i + 1;
printf("Iterations per second : %f", 1000000.0 / ((GetTickCount() - t) / 1000));


I will give an update soon.
clayton · 20 Sep 2006, 16:34 UTC — PPL
although new, this package looks gread. however it does not look like the compiles without ppl being installed. Any suggestions??
You cannot compile without PPL not being installed. If you need to compile on the PocketPC, v1.01 was missing the runtimes, this is now fixed in v1.02. We will be releasing 1.02 very soon.
Thanks!!