[Mono-list] Performance issue

Lloyd Dupont lloyd@galador.net
Tue, 04 Sep 2001 20:34:31 +0200


Miguel de Icaza wrote:
> 
> > this is very annoying. Does someone know if there is performance issue
> > considering C# ?
> 
> Well, there are a few issues you might want to be aware of.
> Standard C# will add a few penalties to your execution speed:
>         * Range checking: the runtime will detect invalid array access
>           by checking every time the range of the array.
that's the point, i guess..
i made a lot of swap in a multidimensional array. (float[][][])

is there a way to improve this ? (i don't believe, but who knows ?)

> You might want to profile the code, and see where it is spending most
> of its time.
Good idea... mhh.. BTW how i do this, please ?

> For computation intensive tasks, you might want to run
> the code inside an unsafe method.
mhh.. this is and idea, though not very easy to manipulate
multdimensional pointer,..
i don't know how they are casted, could i write 
float[][][] tab;
// init...
fixed(float *** fp = tab)
...

????

anyway, thank for your answer,
cheers,
Lloyd