The Cyber-Spy.Com Usenet Archive Feeds Directly
From The Open And Publicly Available Newsgroup
This Group And Thousands Of Others Are Available
On Most IS NNTP News Servers On Port 119.
Cyber-Spy.Com Is NOT Responsible For Any Topic,
Opinions Or Content Posted To This Or Any Other
Newsgroup. This Web Archive Of The Newsgroup And
Posts Are For Informational Purposes Only.
Subject: Re: Integer divide
Date: Fri, 10 Jan 2003 00:46:13 +0000
References: <email@example.com> <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
"Frank Bemelman" wrote:
>Well, it was not just 1 division, but 10.000.000, see code:
>>For x = 1 To 10000000
>> y = Divide(A, x)
>330 mS / 10.000.000 -> 0.000000033 -> 33 nanosecond.
>and 27 nanosecond for the non-vb.
>Not *that* bad.
A version coded in C on an Athlon XP running at 1.875MHz took about 15.5ns
The non-function version complies to
It isn't easy to find instruction timings but the few I found for Pentiums
looked like 2 cycles for cdq and maybe 40 for idiv.
Looking at it you would think the function call and the two loops in the
function would add up to more than 42 cycles. Just shows how optimized
these processors are for common stuff.
Go Back To The Cyber-Spy.Com
Usenet Web Archive Index Of
The sci.electronics.design Newsgroup