Performance comparison X# runtime vs Vulcan runtime

This forum is meant for questions and discussions about the X# language and tools
User avatar
Otto
Posts: 174
Joined: Wed Sep 30, 2015 6:22 pm

Performance comparison X# runtime vs Vulcan runtime

Post by Otto »

Has anyone already any benchmarks? Just curious...
User avatar
wriedmann
Posts: 3658
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Performance comparison X# runtime vs Vulcan runtime

Post by wriedmann »

Hi Otto,

I have it on my todo list.

I'm planning to compare array creation, size change, sort, find.

Do you have other ideas?

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
Otto
Posts: 174
Joined: Wed Sep 30, 2015 6:22 pm

Performance comparison X# runtime vs Vulcan runtime

Post by Otto »

Typical VO/Vulcan language things, using the runtime. But maybe it isn't separable from the compiler sometimes I guess.

* late bound calls
* use of symbols/atoms
* date manipulation
User avatar
wriedmann
Posts: 3658
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Performance comparison X# runtime vs Vulcan runtime

Post by wriedmann »

Hi Otto,

I will try to put together something and release it with the sources so you or someone other can add more tests.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
Chris
Posts: 4593
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Performance comparison X# runtime vs Vulcan runtime

Post by Chris »

Guys,

Just a quick heads up, we did write the runtime with performance in mind, but have not done much optimization on the code yet, first important stuff is to just implement all the required functionality.

This means that in some cases the X# runtime will be faster, but I am sure that in other cases it will be slower, or much slower. But that's just temporarily, it will improve a lot in the coming weeks.

We will also run speed tests, but having said that, any test you do you guys yourselves is greatly appreciated, less work for us to find out in which areas we need to focus regarding speed optimization!

Chris
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
User avatar
wriedmann
Posts: 3658
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Performance comparison X# runtime vs Vulcan runtime

Post by wriedmann »

Hi,

constructing arrays the X# runtime is much, much faster than the Vulcan runtime.

My test code took 6,49 seconds with the Vulcan runtime and 1,67 seconds with the X# runtime.

This was my sample:

Code: Select all

function CheckArrayPerformance() as void
local aArray as array
local aDetail as array
local nI as dword
local nJ as dword
local nLen as dword
local nStart as float
	        
aArray := {}
nLen := 5000
nStart := Seconds()
	
for nI := 1 upto nLen
  aDetail := ArrayNew( int( nLen ) )
    for nJ := 1 upto nLen
      aDetail[nJ]			:= nJ * nI 
    next
    AAdd( aArray, aDetail )
next
	
Console.WriteLine( "Filling the bidimensional test array with " + NTrim( nLen ) + " elements each took " + NTrim( Seconds() - nStart ) + " seconds" )
	
return
Running the test with 10.000 elements failed with both runtimes with a out of memory exception.

Repeating the test with the X# runtime in AnyCPU mode it was slower: 2,23 seconds, but it was able to finish the test also with 10.000 elements.

Very good work!

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
mhsabado
Posts: 4
Joined: Wed Sep 30, 2015 8:17 am

Performance comparison X# runtime vs Vulcan runtime

Post by mhsabado »

Hi,
Maybe OT. Running this test under Harbour 64-bit:

5,000 = 1.6s
10,000 = 6.94s
20,000 = 30.76s

Regards,
Mario
FFF
Posts: 1535
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

Performance comparison X# runtime vs Vulcan runtime

Post by FFF »

Got exactly the same for 5k as you, while 10k needed 9,4sec.
@Chris: there's a trap in XIDE: created a new X# core sample, added the x#runtime references, (Core&VO). Platform auto-changed to x86. clicking on anyCpu (or x64) works, compiles and runs, but silently switches back to x86!

Karl
Regards
Karl
(on Win8.1/64, Xide32 2.19, X#2.19.0.2.)
User avatar
wriedmann
Posts: 3658
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Performance comparison X# runtime vs Vulcan runtime

Post by wriedmann »

I have tried that now with VO 2.8.

With 5.000 elements and the addition of SetMaxDynSize( 0x8000000 ) it took very long until it terminated with a "dynamic memory low" error.
With 2.500 elements it took 27,2 seconds.

My conclusion is that the memory managment in .NET is much, much better in VO, and large VO applications with heavy array use may perform better in X# than in Visual Objects.

Another thing to try will be the macro compiler using AScan().. There I would expect VO to be faster.

Of course the values of Harbour are not off-topic, but they are interesting to see what a machine code program can do better than a .NET based software.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
lumberjack
Posts: 723
Joined: Fri Sep 25, 2015 3:11 pm
Location: South Africa

Performance comparison X# runtime vs Vulcan runtime

Post by lumberjack »

Hi Wolfgang,

AAdd() is quite slow. How does it compare when you use the code as I changed (in blue).

Johan
wriedmann wrote: This was my sample:

Code: Select all

function CheckArrayPerformance() as void
local aArray as array
local aDetail as array
local nI as dword
local nJ as dword
local nLen as dword
local nStart as float

nLen := 5000
nStart := Seconds()
[color=blue]aArray := ArrayNew((int)nLen)[/color]
	
for nI := 1 upto nLen
  aDetail := ArrayNew( int( nLen ) )
    for nJ := 1 upto nLen
      aDetail[nJ]			:= nJ * nI 
    next
    [color=blue]aArray[nI] := aDetail[/color]
next
	
Console.WriteLine( "Filling the bidimensional test array with " + NTrim( nLen ) + " elements each took " + NTrim( Seconds() - nStart ) + " seconds" )
	
return
______________________
Johan Nel
Boshof, South Africa
Post Reply