Main Site Documentation

Please run this program on ChipworkX (some benchmarks)


#1

Hello
I’m running into trouble with the performance of USBizi and am considering the move to ChipworkX.
If someone would be so kind to run this solution and post the results here, that could help me quite a lot.

The zipped solution + source is here:
https://public.me.com/m.munte

Please post the complete debugging output - of a release build please.

m.


#2

[edit] enthusiasm removed.


#3

No need to try, chipworkx is about 6 times faster but also there is very large ram so no GC to slow things down.


#4

[edit] over reaction removed.

@ Erich: don’t you want to give it a try at least - please :slight_smile:

@ Gus: yes, I off course believe you. But I’d feel so much more comfortable to see the numbers…


#5

The output - running on a FEZ Panda II.

PerformanceTester - PrintSomeInfo
System Version: 4.1.5.1
Cpu.SlowClock: 18000000
Cpu.SystemClock: 18000000
Debugger Attached: True

PerformanceTester - MiscTests
time nothing [0.005 ms]
time Utility.ComputeCRC 2701537051 [0.092 ms]
time IntDigits 0: 1 [0.072 ms]
time IntDigits 4000: 4 [0.100 ms]
time IntDigits -4000: 5 [0.128 ms]
time IntDigits int.MaxValue: 10 [0.144 ms]
time IntDigits int.MinValue: 11 [0.169 ms]

PerformanceTester - ArrayTests
time fill bytes1 [4.769 ms]
time FillArrayWithIndexValue bytes1 [4.780 ms]
time Array.Clear [0.053 ms]
time Array.Copy [0.090 ms]
time bytes1.CopyTo [0.126 ms]
time Array.IndexOf 98 is 98 [0.300 ms]
time Utility.CombineArrays 200 [0.073 ms]
time Utility.ExtractValueFromArray 50462976 [0.050 ms]
time Utility.ExtractRangeFromArray 10 [0.063 ms]
time bytes2[99] == 99 True [0.024 ms]
time bytes2[bytes2.Length-1] == 99 True [0.037 ms]

PerformanceTester - StringTests 100chars
time init string of 100 chars [0.017 ms]
time UTF8Encoding.UTF8.GetBytes [0.235 ms]
time UTF8Encoding.UTF8.GetChars [0.397 ms]
time new string(chars) [0.117 ms]

PerformanceTester - StringTestsShort 20chars
time init string of 20 chars [0.017 ms]
time UTF8Encoding.UTF8.GetBytes [0.192 ms]
time UTF8Encoding.UTF8.GetChars [0.238 ms]
time new string(chars) [0.068 ms]

PerformanceTester - SomeLoopOps
Time loop: i++, u++ [2.936 ms]
Time loop: i += 1, u += 1 [2.930 ms]
Time loop: f = 2.0f/3.0f [1.968 ms]
Time loop: d = 2.0/3.0 [1.963 ms]
Time loop: if (i % 10 == 0) u4++ [3.195 ms]

PerformanceTester - ClearByteArray
create new byte array [0.025 ms] 00
Array.Clear [0.053 ms]
clear using ‘for ++’ [3.353 ms]
clear using ‘for --’ [3.265 ms]
clear using ‘while --’ [2.864 ms]

PerformanceTester - SumByteArray
sum byte array ‘for each’ [5.387 ms]
sum byte array ‘for ++’ [3.961 ms]
sum byte array ‘while --’ [3.375 ms]

PerformanceTester - IntToByteArrayTests
time IntToASCII 0: 0 [0.143 ms]
time IntToASCII 4000: 4000 [0.338 ms]
time IntToASCII -4000: -4000 [0.379 ms]
time IntToASCII int.MaxValue: 2147483647 [0.727 ms]
time IntToASCII int.MinValue: -2147483647 [0.766 ms]
time int.ToString + GetBytes 0: 0 [0.908 ms]
time int.ToString + GetBytes 4000: 4000 [0.917 ms]
time int.ToString + GetBytes -4000: -4000 [1.355 ms]
time int.ToString + GetBytes int.MaxValue: 2147483647 [0.931 ms]
time int.ToString + GetBytes int.MinValue+1: -2147483647 [1.166 ms]


#6

Don’t want to “confuse” people - so says the OP


#7

Hello Rajesh,

when I run my Panda in debug mode, I get the same numbers as you posted. So I guess you also ran the Cobra test in debug mode. Maybe you can re-do the test and edit your post to avoid confusion.
Still, I am surprised that the debug code is no much slower on Cobra then on Panda. I have no idea why. Thanks.

Mark


#8

Hi Maoli

Did not make any big diff. between Debug/Release Start Debugging/Start Without Debugging


#9

Hi,
when I ran the tests, I noted that built in functions are always the same speed, no matter if debug or release is chosen. Self written functions, especially loops, can vary quite a lot. Is the Cobra still considerably slower than the Panda when you switch to Release?

Eg.
Debug
sum byte array ‘while --’ [5.493 ms] - custom function
time IntToASCII 4000: 4000 [0.508 ms] - custom function
Time loop: if (i % 10 == 0) u4++ [6.036 ms] - custom function
time UTF8Encoding.UTF8.GetBytes [0.192 ms] - built in
time Array.Clear [0.054 ms] - built in

Release
sum byte array ‘while --’ [3.376 ms] - custom function
time IntToASCII 4000: 4000 [0.338 ms] - custom function
Time loop: if (i % 10 == 0) u4++ [3.195 ms] - custom function
time UTF8Encoding.UTF8.GetBytes [0.192 ms] - built in
time Array.Clear [0.053 ms] - built in