Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] Profiling

Date2008-04-16 09:35
Fromvictor
SubjectRe: [Cs-dev] Profiling
But as far as I can remember many opcodes still use pointer arithmetic
instead of array indexing? Should we not move everything to array access?

Also I reckon we could try to save on int casting as that is one of the
costly operations (esp. on windows).

Another unrelated thing: is there any reason to keep the old power of two
rule for table-access opcodes (table*, tablew, ...). I think we could
safely move to floating-point indexing there without too many problems.
What do you think?

Victor
----- Original Message ----- 
From: "jpff" 
To: "Developer discussions" 
Cc: 
Sent: Wednesday, April 16, 2008 9:24 AM
Subject: Re: [Cs-dev] Profiling


> As far as I can remember Istvan and myself did a little profiling; it
> was this that led to the code change from pointer arithmetic to array
> access in the loops on ksmps.  Not much since of which I am aware.  I
> have rarely used valgrind on it to look for memory problems.
> ==John ffitch
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel 


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-04-16 10:34
Fromjpff
SubjectRe: [Cs-dev] Profiling
>>>>> "victor" == victor   writes:

 victor> But as far as I can remember many opcodes still use pointer arithmetic
 victor> instead of array indexing? Should we not move everything to array access?

Yes, but many fewer than in Csound4.  I have been changing these as I
get time or as I am working on the opcode.  I think we shoudl move to
array access as the compilers can handle that better

 victor> Also I reckon we could try to save on int casting as that is one of the
 victor> costly operations (esp. on windows).

I was thinking that we might do well to look for all short and longs
and use int32 and int16 in preference.  There are places where long is
used, when 32bits are needed.  Of course one should avoid casts
whenever possible!

 victor> Another unrelated thing: is there any reason to keep the old power of two
 victor> rule for table-access opcodes (table*, tablew, ...). I think we could
 victor> safely move to floating-point indexing there without too many problems.
 victor> What do you think?

I wanted to do this some time back but got very lost in some of the
oscil opcodes.  This has been on the long list for ages.

With luck and judgement we can find other stuff by profiling

==John ffitch

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-04-16 11:38
FromVictor Lazzarini
SubjectRe: [Cs-dev] Profiling
I suppose the oscil opcodes could be left as they are. Their use of
integer maths for indexing & increment seems to make a good
difference in speed.
But I was thinking that table access, since it only uses indexing could
just be made floating-point (double precision). There would be one
unavoidable cast (but only one), however the gain in using any size
tables should be worth it.

Victor



>  victor> Another unrelated thing: is there any reason to keep the old 
> power of two
>  victor> rule for table-access opcodes (table*, tablew, ...). I think we 
> could
>  victor> safely move to floating-point indexing there without too many 
> problems.
>  victor> What do you think?
>
>I wanted to do this some time back but got very lost in some of the
>oscil opcodes.  This has been on the long list for ages.
>
>With luck and judgement we can find other stuff by profiling
>
>==John ffitch
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>Don't miss this year's exciting event. There's still time to save $100.
>Use priority code J8TL2D2.
>http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>_______________________________________________
>Csound-devel mailing list
>Csound-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/csound-devel

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net