Article View: borland.public.cppbuilder.nativeapi
Article #5877Re: How can i use AMD Dual-Core computer ?
From: Dani
Date: Wed, 29 Jun 2005 14:13
Date: Wed, 29 Jun 2005 14:13
58 lines
2378 bytes
2378 bytes
Hi,
I find your answer very confusing.
If this is my code -
// ------------------------------------------------------------
__fastcall TForm1::TForm1( TComponent *Owner ) : TForm( Owner )
{
int Num1 = 0;
int Num2 = 0;
while( true )
{
Func1( &Num1 );
Func2( &Num2 );
if ( ( Num1 + Num2 ) > 0xFFFFFF )
break;
}
ShowMessage( "Finish Process!" );
Application->ProcessUserMessages();
}
// ------------------------------------------------------------
void Func1( int *Num )
{
*Num++;
}
// ------------------------------------------------------------
void Func2( int *Num )
{
*Num++;
}
// ------------------------------------------------------------
i run it on a Windows-XP ( Home Edition ) Computer, and it's
taking it 100 seconds to run, if i will change this code so that
the call for Func1() is done from one thread and the call to
Func2() is done from another thread, will the application run
faster now? will it take less then 70 secons? maybe 50?
It's more a question of Yes or No i think.....
You suggest to try it and see, but the problem is that i don't
have any Dual-Core computer to test it on, and i'll buy one only
if i know for sure that it will give me more than 30% increase
in speed, so i must know the answer, doesn't anyone of you
worked with that kind of computer? doesn't anyone know?
Dani.
Technical Details
Message-ID:
<42c2ac9c$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<42bfd4c7@newsgroups.borland.com> <bmf0c1thchuiqsj088mfgfs2403si61g5c@4ax.com> <42c0edd2$1@newsgroups.borland.com> <gmt2c1duvdgggvd0lg8j9tous0p46c846p@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,3c25e24c9f38e644 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Dani" <DaniNoMail@internet.com> Sender: "Dani" <DaniNoMail@internet.com> Reply-To: "Dani" <DaniNoMail@internet.com> Subject: Re: How can i use AMD Dual-Core computer ? Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 62.0.27.159 References: <42bfd4c7@newsgroups.borland.com> <bmf0c1thchuiqsj088mfgfs2403si61g5c@4ax.com> <42c0edd2$1@newsgroups.borland.com> <gmt2c1duvdgggvd0lg8j9tous0p46c846p@4ax.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <42c2ac9c$1@newsgroups.borland.com> Date: 29 Jun 2005 07:13:48 -0700 X-Trace: newsgroups.borland.com 1120054428 207.105.83.66 (29 Jun 2005 07:13:48 -0700) Lines: 59 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail