[Mono-list] about performance and multimedia library

David Gardner david@pipco.freeserve.co.uk
Sun, 15 Jul 2001 20:57:06 GMT


>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 7/15/01, 11:37:18 AM, Lloyd Dupont <lloyd@galador.net> wrote regarding 
[Mono-list] about performance and multimedia library:


> i discover C# and found it quite well.
> i already known SDL (http://www.libsdl.org) which is a low level access
> and multiplatform (win, linux, Be, MacOSX,...) C library
> to accelerated graphics, cd_rom, device, and the like...

> i plan to write a thin C# wrapper of it & OpenGL for everybody benefit.

> wondering about some feature i begin a test of struct and native
> function.
> i had a simple test calling a void C function from C# and compare it to
> a void C# function.

> i was afraid by C call several time slower than C# call (100 times).
> (just the call, as there is no code inside)
> as i know you are looking for a multimedia library and a volunteer to
> work on, i join you my very simple test code, so you could compare and
> tell me if your compiler do a better work than does microsoft C# one.

Ouch.

I haven't got the MS .NET compilers to test it. I looked at the code and 
the only question I'd ask is: Is your C# doNothing function getting 
optimized out, so it's not getting called at all? Make the doNothing 
functions non-trivial, perhaps make it increment a global int. I have 
memories of GCC optimizing away trivial functions in the old days and not 
even exporting the symbol!

Good luck with SDL and GL, I use them both too. You could try a real test 
- write a standard C program that calls glColor3f 100000 times, and write 
a C# program that does the same (doing a C function call). That will 
alert you to whether there will be a performance issue.

Dave