flat assembler
Message board for the users of flat assembler.

Index > Main > BT instruction?

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
so anyone could create thread for "Speed testing code" and put it all together? Wink
Post 22 Jan 2007, 06:05
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2466
Location: Bucharest, Romania
Borsuc
I mainly use BT for small code.. speed is hard to measure because it varies on processor.

I remember some time ago I did this test, and bt was much slower on my Pentium 4, but almost tied on my AMD Mobile Sempron 2800+.

But I can't remember if I did it right, but I did use maximum priority (even the mouse froze during the test).
Post 24 Jan 2007, 10:52
View user's profile Send private message Reply with quote
Plue



Joined: 15 Dec 2005
Posts: 151
Plue
> I mainly use BT for small code
But BT is larger than TEST?!?
Post 24 Jan 2007, 16:10
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
Plue wrote:
> I mainly use BT for small code
But BT is larger than TEST?!?


Nah, you need more than just a TEST instruction to perform the sam as BT [mem32], reg32 - BT is small here.

_________________
Image - carpe noctem
Post 24 Jan 2007, 16:43
View user's profile Send private message Visit poster's website Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 604
Location: Germany
MCD
f0dder wrote:

Nah, you need more than just a TEST instruction to perform the sam as BT [mem32], reg32 - BT is small here.

You absolutely right. BTx instructions are useful when you need to test a bit at a position not know at compile-time and if you only have a few bits to test.

if bit position is know at compile time => use TEST or something

if you have lots of bits to test => try building a mask, maybe with some look up table and perform a TEST with that

BTW: BTx is almost as fast as TEST (except for the memory version) on my Athlon XP, but was way slower than TEST on a PII

_________________
MCD - the inevitable return of the Mad Computer Doggy

-||__/
.|+-~
.|| ||
Post 25 Jan 2007, 11:40
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7709
Location: Kraków, Poland
Tomasz Grysztar
BTx instructions other than BT are also useful because the allow to test the bit and alter it at the same time.
Post 25 Jan 2007, 11:42
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.