octave-maintainers
[Top][All Lists]
Advanced

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

Re: [Patch, Profiler] Profiling of operators


From: Daniel Kraft
Subject: Re: [Patch, Profiler] Profiling of operators
Date: Fri, 29 Jul 2011 22:26:17 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20110624 Thunderbird/5.0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/29/11 22:04, John W. Eaton wrote:
> On 29-Jul-2011, Daniel Kraft wrote: | Actually, it's not the function
> name which is used but | octave_function::profiler_name() -- so I
> suppose the best way to handle | overloads would be to make this
> function return something like | "myfunction(double)" vs.
> "myfunction(int8)" instead of just | "myfunction".  Then it is both
> clear to the user what an entry means and | also the string can again
> be used as identifier of the function for | collecting data.  Does
> that make sense?
> 
> I think it would be OK to just use the full name of the function, 
> including the directory name where the .m file is defined.

Let's leave this for now and think about it later.  As I wrote, changing
this requires "just" changing the octave_function::profiler_name()
methods (including in subclasses where it is overwritten).  Nothing to
do about the core-profiler.

> I took a quick look at having the interpreter convert operators to 
> function calls and it is not as simple as I thought it would be. 
> Things that will require some thought are how to deal with constant 
> folding, what to do about Matlab-style short circuit evaluation for
> | and &.  Also, since we don't have pass-by-reference semantics for 
> function calls, I don't think we can allow overloading for increment 
> and decrement operators.

- From my point of view, that shouldn't be necessary.  Again, what we have
to do here in order to fix overloading (for instance) is "just" to
disambiguate the string passed to the profiler.

BTW, currently the profiler reports times for operators like "prefix ++"
or "binary \".  At least to me this looks nicer than if it would say
"plus" when I actually used "+".  Namely, until recently I didn't even
know that operators have an equivalent function form; and I would surely
have been confused to find "plus" in the profile.  Or if I saw the
function name for \ in a profile, I wouldn't recognize it was due to
linear system solving.

Yours,
Daniel

- -- 
OpenPGP: 3BA2 3DDB 7758 F010 BDAB 0DCF 527E 79BA A3B5 3998
or use https://safesend.kraftware.de/
- --
Done:  Arc-Bar-Cav-Kni-Ran-Rog-Sam-Tou-Val-Wiz
To go: Hea-Mon-Pri
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOMxdoAAoJEFJ+ebqjtTmYPZsP/ROGgUtEFEqR/WgCvBJ74sWb
0sWMgilwQ9ngDsffQXRrY/XUzsXTzm1kRYNT7z4dsUdNje/D76n5pkZbwDJMRcNN
oq54QQhk2ANTElr9c2FXBtbiVaowLG0F2mNRT62ey3XCRuXeTbEnX9HDofoRxK1j
limRoGjceMT6FmIb+kV/9pF6lOFsICi2udxtyE1axbG+I2Z6K+tZyvqIe8ekH4L1
f7GfiKZNqoQHN+9Cwdp8LKpyvMu2u6eySICfrCZOMDwMvhhqlab7Iz3trWmA4gkr
jed+Lany15J/crcZQ3au1s3f4+/ml1zMqwLrK8Al2UJvZnq9hX1F6znk6Eke2C0k
8tpmx13htwfLO5Wjyier07ulfMm6CHcdy1Ln0HuK6A1KFGCzXoPtiRX/mxu5qPW8
HE4WDXY11jeKLU+zJzlRi2Cw/CqDfWBC9fGhRdY1dF6yWCaGxDzwcTXRZewmhRSP
bqJZZT94IDLh7E0euuyD9WadF6/ons8Uv1H8ajkmbnf6T++uMFCme5NrwPyheZlW
5csRN5J+J6ZkBZeAsxfoD1A3QHaqFdNVG64vm/3f1MyjBmdqvMeiZ2YJa1tT7kOr
5GETDXPMLT/y82dTSuQcK7gXJ8HWFeeUxSSwnXwrNF99bEapajBqidinaIN3IIku
c1Mkuw3EGTb843WAwEe+
=wS4/
-----END PGP SIGNATURE-----


reply via email to

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