octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: For loop benchmarks between Octave versions


From: Daniel J Sebald
Subject: Re: For loop benchmarks between Octave versions
Date: Tue, 24 Jun 2014 02:47:18 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 06/24/2014 02:06 AM, Daniel J Sebald wrote:
On 06/24/2014 12:01 AM, Julien Bect wrote:


An interesting reference : http://speed.julialang.org/about ?


There's even test results for Octave in the table here:

http://julialang.org/

Julia looks very similar to the familiar syntax we know for Octave with
a few extra features for parallelism. However, I don't understand the
Julia setup well enough to know how the comparison is done and how we
can automate comparisons integrating Julia.

OK, looking at your perf.m, I get it now. There are similar performance perf.X files in the Julia repository. I don't see any license language there.

In theory, we could do something similar, i.e., just write our own little utility program in C that implements the tests done in Octave code. Since we are always using a C compiler, we could make the building of this utility part of the Octave build process. For example, say the C program (call it Cperf.c for now) generates as an output a string of characters that lists the test and the CPU consumption:

systemcommline> Cperf
doubleForLoop/1: 181.8
doubleForLoop/a=1: 294.7
doubleForLoop/a=b: 275.6
doubleForLoop/a=a+b: 335.8
doubleForLoop/a=sin(b*i): 383.4
vectorOfSquares: 677.7
mandel: 224.9
fib: 687.6
parse_int: 2392.1
quicksort: 1244.9
pi_sum: 18236.1
rand_mat_stat: 572.8
rand_mat_mul: 515.9
printfd: 1233.3

Then, the Octave test script that implement perf.m could call the system function Cperf to get the values and do the relative-to-C comparisons.

That seems like a pretty good comparison to me, and the benefit is we know that Cperf is built with pretty much the same environment as Matlab and is always present.

Dan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]