| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: Organizing source code |
From: "Paul Ranson"
'register' is ignored by most compliers, they can do a much better job than
almost any individual human of choosing register allocations. In this
particular case the loop isn't executed at all since it serves no purpose.
Poking bytes into screen memory isn't going to help you on a modern Windows
machine. With today's technology the display overhead is very small for
text and normal stuff in relation to how much you can absorb as a user.
The Timer class simply records the clock when it is created and when it is
destroyed it reports the elapsed time in 'ticks'. The 'ticks' are read
directly from the processor, I think it's a count at clock frequency
available on Pentium onwards.
Paul
"Geo" wrote in message news:417f74bf{at}w3.nls.net...
> "Paul Ranson" wrote in message
> news:417e6654{at}w3.nls.net...
>
>>>Why do you want to display the numbers 1-1000000000? You won't be able to
> see them. And you'll be measuring the performance of the display system
> right down to the graphics card driver rather than any code you're
> writing.<<
>
> Because it allows you to be more clever since it uses more of the system.
> Poking the number into screen memory instead of using a display function
> is
> much faster.
>
>>unsigned u ;
>>while ( u < 1000000000 )
> > ++u ;
>
> So would doing
>
> register unsigned u;
> while ( u < 1000000000 )
> ++u ;
>
> make a difference?
>
>>Which sort of implies that double is faster on this occasion. It's up to
> you to work out why...
>
> I'm still working out how your time function functions..
>
> Geo.
>
>
--- BBBS/NT v4.01 Flag-5
* Origin: Barktopia BBS Site http://HarborWebs.com:8081 (1:379/45)SEEN-BY: 633/267 270 5030/786 @PATH: 379/45 1 396/45 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.