POV-Ray : Newsgroups : povray.off-topic : Who says .NET is slow...? Server Time
6 Sep 2024 09:17:09 EDT (-0400)
  Who says .NET is slow...? (Message 11 to 20 of 27)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 7 Messages >>>
From: Mike Raiford
Subject: Re: Who says .NET is slow...?
Date: 22 Feb 2009 14:32:52
Message: <49a1a864@news.povray.org>
Nicolas Alvarez wrote:
> Mike Raiford wrote:
>> 1024x768 frame buffer...
> 
> I estimate I'm getting 0.5fps.

Wow... are you running Vista, by any chance..? On my WinXP machine, I 
was getting about 20fps..

I found that on my Vista machine it runs significantly slower.


Post a reply to this message

From: Mike Raiford
Subject: Re: Who says .NET is slow...?
Date: 22 Feb 2009 14:39:55
Message: <49a1aa0b$1@news.povray.org>
Darren New wrote:
> Mike Raiford wrote:
> 
> OK. I'm just saying ... what makes you think it's not "down to the wire" 
> in this case?  It doesn't look like you're doing anything in the inner 
> loops of the tick that you couldn't do equally well in C, so why 
> wouldn't the JIT generate equivalently efficient code?
> 

Maybe it is, but everything is still managed code. The JIT should 
produce efficient code, for sure, and it does. I was just happy to see 
that an effect like this can be achieved, and with a relatively large 
frame buffer. That's all I guess. Some seem to think that the .NET 
framework, or that JIT environments are too slow for these sorts of 
tricks, or effects.

I think, didn't someone port Quake to Managed C++?

> 
> Cool. I've only done large-scale manipulations, not drawing 
> pixel-by-pixel, so I guess I never ran into that problem.
> 

Right, the GDI+ functions are generally pretty good for most drawing 
situations.


Post a reply to this message

From: Darren New
Subject: Re: Who says .NET is slow...?
Date: 22 Feb 2009 15:48:46
Message: <49a1ba2e$1@news.povray.org>
Mike Raiford wrote:
> Maybe it is, but everything is still managed code. The JIT should 
> produce efficient code, for sure, and it does. I was just happy to see 
> that an effect like this can be achieved, and with a relatively large 
> frame buffer. That's all I guess. Some seem to think that the .NET 
> framework, or that JIT environments are too slow for these sorts of 
> tricks, or effects.

True. People who never really think about the issues tend to just listen to 
the FUD.

> I think, didn't someone port Quake to Managed C++?

Yes, but I'm not sure they ported the "hard parts". As in, it was something 
like a few hundred lines of code written over the course of a handful of 
hours to "port" it. I don't think they (for example) moved all the data 
structures into managed space, other than perhaps the screen and keyboard I/O.

> Right, the GDI+ functions are generally pretty good for most drawing 
> situations.

I thought the transformation matrix approach to color control was pretty 
cool. Probably pretty common across toolkits, I'd guess, tho.

-- 
   Darren New, San Diego CA, USA (PST)
   My fortune cookie said, "You will soon be
   unable to read this, even at arm's length."


Post a reply to this message

From: scott
Subject: Re: Who says .NET is slow...?
Date: 23 Feb 2009 02:35:45
Message: <49a251d1$1@news.povray.org>
> I found that on my Vista machine it runs significantly slower.

Running Vista here, I estimate about 10-20 fps (assuming it goes up one line 
per frame).

It's only using 1 of my cores though .... :-)


Post a reply to this message

From: scott
Subject: Re: Who says .NET is slow...?
Date: 23 Feb 2009 02:37:00
Message: <49a2521c$1@news.povray.org>
> I would think there's relatively little need to be slow in a program like 
> this, where it's all manipulation of fundamental structures. 

I think the GPU would be faster at this sort of program than the CPU :-)


Post a reply to this message

From: Mike Raiford
Subject: Re: Who says .NET is slow...?
Date: 23 Feb 2009 06:56:14
Message: <49a28ede@news.povray.org>
scott wrote:
>> I found that on my Vista machine it runs significantly slower.
> 
> Running Vista here, I estimate about 10-20 fps (assuming it goes up one 
> line per frame).

Then why the hell is my Vista box always so freaking slow?!!

> It's only using 1 of my cores though .... :-)
> 
> 

Yeah, I didn't get all fancy and multi-threaded.. I suppose it could be 
easily parallelized, though.


Post a reply to this message

From: scott
Subject: Re: Who says .NET is slow...?
Date: 23 Feb 2009 07:16:20
Message: <49a29394$1@news.povray.org>
>> Running Vista here, I estimate about 10-20 fps (assuming it goes up one 
>> line per frame).
>
> Then why the hell is my Vista box always so freaking slow?!!

Ooh I just tried it on my XP laptop, and by the time the red has got to the 
top it's only 80% of the way there on Vista.  My Vista box is about 10x 
faster than my laptop so who knows what is going on.

Does it make a difference under Vista if you take out the 
"ControlStyles.OptimizedDoubleBuffer" flag?

Also you are locking the bitmap for quite a long time (relatively), you 
should literally lock, memcopy, unlock. Any processing should be done 
outside of that on a separate buffer.  Maybe it is holding up Vista somehow 
when it's trying to copy the bitmap to the graphics card?


Post a reply to this message

From: Darren New
Subject: Re: Who says .NET is slow...?
Date: 23 Feb 2009 12:00:00
Message: <49a2d610$1@news.povray.org>
scott wrote:
>> I would think there's relatively little need to be slow in a program 
>> like this, where it's all manipulation of fundamental structures. 
> 
> I think the GPU would be faster at this sort of program than the CPU :-)

http://www.nzone.com/object/nzone_cascades_videos.html

-- 
   Darren New, San Diego CA, USA (PST)
   My fortune cookie said, "You will soon be
   unable to read this, even at arm's length."


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Who says .NET is slow...?
Date: 23 Feb 2009 16:16:43
Message: <49a3123b@news.povray.org>
Mike Raiford wrote:
> Wow... are you running Vista, by any chance..? On my WinXP machine, I
> was getting about 20fps..

I'm running it via Mono, on Linux.


Post a reply to this message

From: Invisible
Subject: Re: Who says .NET is slow...?
Date: 24 Feb 2009 04:06:29
Message: <49a3b895$1@news.povray.org>
Darren New wrote:

> http://www.nzone.com/object/nzone_cascades_videos.html

I'm *still* irritated that you can't run Cascades without Vista...


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 7 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.