flat assembler
Message board for the users of flat assembler.

Index > Main > what is faster?

Goto page Previous  1, 2, 3
Author
Thread Post new topic Reply to topic
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 28 Feb 2011, 22:14
edfed wrote:
Mode 13h is good enough. Laughing
Suuuuuuuuuuuuuuuuuuuuuuuuuuuuuure thing Smile

_________________
carpe noctem
Post 28 Feb 2011, 22:14
View user's profile Send private message Reply with quote
Teehee



Joined: 05 Aug 2009
Posts: 570
Location: Brazil
Teehee 07 Mar 2011, 19:52
Hi.

i made this function (32bits):
Code:
    drawchar:
        ;mov   ebx,a
        add   edi,1280*4*(8-1)-4
        mov   eax,ebx
        add   ebx,8*8-1
  .nxty:mov   ecx,8
  .nxtx:cmp   byte[ebx],0
        je    @f
        mov   dword[edi+ecx*4],-1 ; set pixel color
     @@:dec   ebx
        dec   ecx
        jnz  .nxtx
        sub   edi,1280*4
        cmp   ebx,eax
        jnbe .nxty
        ret    

Is it good for performance to change some registers to a small ones? like (just a example, idunno if its right):
Code:
    drawchar:
        ;mov   bx,a
        add   edi,1280*4*(8-1)-4
        mov   ax,bx
        add   bx,8*8-1
  .nxty:mov   cl,8
  .nxtx:cmp   byte[bx],0
        je    @f
        mov   dword[edi+ecx*4],-1 ; set pixel color
     @@:dec   bx
        dec   cl
        jnz  .nxtx
        sub   edi,1280*4
        cmp   bx,ax
        jnbe .nxty
        ret    
Post 07 Mar 2011, 19:52
View user's profile Send private message Reply with quote
Teehee



Joined: 05 Aug 2009
Posts: 570
Location: Brazil
Teehee 08 Mar 2011, 15:52
please i really would like to know that.
Post 08 Mar 2011, 15:52
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20630
Location: In your JS exploiting you and your system
revolution 24 Mar 2011, 02:00
Teehee wrote:
Is it good for performance to change some registers to a small ones?
Have you read some of the posts about "which is faster"? To answer your question accurately: No one knows. The reason no one knows is that the answer depends upon so many factors that it is impossible to say what is, or is not, good for performance. Here is a suggestion though: test it. If you find it is faster for you, in your system, with your setup, etc. then go ahead and use it.
Post 24 Mar 2011, 02:00
View user's profile Send private message Visit poster's website Reply with quote
iic2



Joined: 26 Jun 2008
Posts: 122
iic2 06 Apr 2011, 11:07
Quote:
Teehee wrote: Is it good for performance to change some registers to a small ones?


I been looking for this on my machine for over a week. Come to find it's in the new version of masm32. Those doc's apply here also. The author always said that by the byte can be quicker than dword. I tested before and it's true. A flare will hit 1000 feet long before Apollo even leave the ground. So smaller can be faster. You got to test these days darn near along because nothing is standard anymore but this should still serve as an base-line at the very lease.


Description:
Download
Filename: OPCODES.zip
Filesize: 65.54 KB
Downloaded: 347 Time(s)

Post 06 Apr 2011, 11:07
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3

< 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.