News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Some Test Needed

Started by frktons, November 09, 2010, 02:30:30 PM

Previous topic - Next topic

frktons

This is an experiment on the fastest way to convert a byte string
into a word string, that is double size of original one.

It is in the New Testbed [work in progress].

Could you please test it on your machines and post the partial screen displayed
as the following:


┌────────────────────────────────────────────────────────────────────────────────────────┐
│OS  : Microsoft Windows 7 Ultimate Edition, 64-bit (build 7600)                         │
│CPU : Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz with MMX, SSE1, SSE2, SSE3, SSSE3           │
│                                                                                        │
│Test: Conversion of a screen buffer from DOS to Windows CHAR_INFO structure             │
├─────────────────────────────────┬─────────┬──────────┬──────────┬──────────┬──────────┬┤
│        Algorithm notes          │Proc Size│ Test # 1 │ Test # 2 │ Test # 3 │ Test # 4 ││
├─────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┼┤
│01 Alex / MMX - PUNPCKLBW        │   62    │    6.052 │    6.096 │    6.027 │    6.013 ││
├─────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┼┤
│02 Frank / 486 - MOV-BSWAP       │   43    │    8.463 │    8.470 │    8.478 │    8.483 ││
├─────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┼┤
│03 Frank / XMM - PUNPCKLBW       │   44    │    2.338 │    2.337 │    2.340 │    2.339 ││
├─────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┼┤


Attached the new testbed with the routines to test.

Frank
Mind is like a parachute. You know what to do in order to use it :-)

redskull

+----------------------------------------------------------------------------------------+
¦OS  : Microsoft Windows XP Professional Service Pack 3 (build 2600)                     ¦
¦CPU : AMD Athlon(tm) Dual Core Processor 5000B with MMX, SSE1, SSE2, SSE3               ¦
¦                                                                                        ¦
¦Test: Conversion of a screen buffer from DOS to Windows CHAR_INFO structure             ¦
+----------------------------------------------------------------------------------------¦
¦        Algorithm notes          ¦Proc Size¦ Test # 1 ¦ Test # 2 ¦ Test # 3 ¦ Test # 4 ¦¦
+---------------------------------+---------+----------+----------+----------+----------+¦
¦01 Alex / MMX - PUNPCKLBW        ¦   62    ¦    6.805 ¦    5.484 ¦    5.627 ¦    5.981 ¦¦
+---------------------------------+---------+----------+----------+----------+----------+¦
¦02 Frank / 486 - MOV-BSWAP       ¦   43    ¦    6.307 ¦    6.300 ¦    6.300 ¦    6.406 ¦¦
+---------------------------------+---------+----------+----------+----------+----------+¦
¦03 Frank / XMM - PUNPCKLBW       ¦   44    ¦    2.826 ¦    2.829 ¦    3.027 ¦    2.846 ¦¦


-r
Strange women, lying in ponds, distributing swords, is no basis for a system of government

dedndave

how many columns ?
i had to widen my console window
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
┌────────────────────────────────────────────────────────────────────────────────────────┐
│OS  : Microsoft Windows XP Professional Service Pack 2 (build 2600)                     │
│CPU : Intel(R) Pentium(R) 4 CPU 3.00GHz with MMX, SSE1, SSE2, SSE3                      │
│                                                                                        │
│Test: Conversion of a screen buffer from DOS to Windows CHAR_INFO structure             │
├─────────────────────────────────┬─────────┬──────────┬──────────┬──────────┬──────────┬┤
│        Algorithm notes          │Proc Size│ Test # 1 │ Test # 2 │ Test # 3 │ Test # 4 ││
├─────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┼┤
│01 Alex / MMX - PUNPCKLBW        │   62    │    8.945 │    8.906 │    8.749 │   10.227 ││
├─────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┼┤
│02 Frank / 486 - MOV-BSWAP       │   43    │   14.982 │   13.514 │   13.530 │   13.506 ││
├─────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┼┤
│03 Frank / XMM - PUNPCKLBW       │   44    │    4.369 │    4.364 │    4.711 │    4.370 ││
C:\Documents and Settings\Dave\Desktop\Beta 0.90\Beta 0.90>───────┼──────────┼──────────┼┤


this is what i got with 80 column window
12345678901234567890123456789012345678901234567890123456789012345678901234567890
┌───────────────────────────────────────────────────────────────────────────────
│OS  : Microsoft Windows XP Professional Service Pack 2 (build 2600)
│CPU : Intel(R) Pentium(R) 4 CPU 3.00GHz with MMX, SSE1, SSE2, SSE3

│Test: Conversion of a screen buffer from DOS to Windows CHAR_INFO structure
├─────────────────────────────────┬─────────┬──────────┬──────────┬──────────┬──
│        Algorithm notes          │Proc Size│ Test # 1 │ Test # 2 │ Test # 3 │ T
├─────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──
│01 Alex / MMX - PUNPCKLBW        │   62    │    8.807 │    9.043 │   10.58410.7
84────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──
│02 Frank / 486 - MOV-BSWAP       │   43    │   13.482 │   13.537 │   13.51713.7
22────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──
│03 Frank / XMM - PUNPCKLBW       │   44    │    4.555 │    5.208 │    4.3634.38
1─────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──
C:\Documents and Settings\Dave\Desktop\Beta 0.90\Beta 0.90>       │          │

frktons

90 columns, 34 rows. The executable is set to work that way. If you assemble/link
the source you have probably to change console properties.

Frank
Mind is like a parachute. You know what to do in order to use it :-)

dedndave

if i open the exe by clicking on it, it runs ok, but i cannot copy/paste the results with XP while it is running
the mouse is disabled while waiting for the keypress

so, i open a console window and type in the program name at the prompt
then, i exit the program to copy/paste

frktons

Quote from: dedndave on November 09, 2010, 04:19:02 PM
if i open the exe by clicking on it, it runs ok, but i cannot copy/paste the results with XP while it is running
the mouse is disabled while waiting for the keypress

so, i open a console window and type in the program name at the prompt
then, i exit the program to copy/paste

I don't remember how XP manages the console, but in Win/7 when I run the prog,
after it has displayed the test results, if I right click on the topleft icon I can have access
to the console properties, and see if the edit mode is selected or not. It should be.
This permits to select part of the screen with the mouse, or you can select all, copy
and eliminate redundant lines after pasting it somewhere.

Of course you should not be in full screen mode in XP.  :P

Frank 
Mind is like a parachute. You know what to do in order to use it :-)

dedndave

ok Frank - that works
i can right-click on the title bar and access the edit context while it is running   :P

frktons

Quote from: dedndave on November 09, 2010, 05:04:32 PM
ok Frank - that works
i can right-click on the title bar and access the edit context while it is running   :P

Good to know that XP has this capacity as well.  :U

What do you think of the overall project New Testbed?
Do you think somebody will ever use it?  :lol

Frank
Mind is like a parachute. You know what to do in order to use it :-)

dedndave

i do
however.....
i am thinking we may want a GUI app, though
not just because of presentation and appearance
it is more likely to provide a real-world environment for the test code to run under

you probably already have that on your to-do list   :bg

frktons

Quote from: dedndave on November 09, 2010, 05:13:59 PM
i do
however.....
i am thinking we may want a GUI app, though
not just because of presentation and appearance
it is more likely to represent a real-world environment for the test code to run under

you probably already have that on your to-do list   :bg

Well, I'm developing this version to learn some new ASM and to have a tool
to test the algos. Because the testbed used so far is just nothing more than
a sequence of algos and prints, I had the idea to build this new one as
an alternative as well with a more user friendly interface and some extra-bonus added.

The gui version could be useful as well, but algos are just that, and usually
a console mode suffices.

It'll suffice for a couple of years, at least for me.  :P

There are a lot of routines inside the New Testbed, and most of them are not
optimized at all. Experimenting with them, optimizing them will be my hobby
for the months to come. The program is not finished yet.  Testing all the PROCs within
with the same program will be its way of evolving  :lol

Frank
Mind is like a parachute. You know what to do in order to use it :-)

ToutEnMasm

#10

┌──────────────────────────────────────────────────────────
│OS  : Microsoft Windows XP Professional Service Pack 3 (build 2600)
│CPU : Intel(R) Celeron(R) CPU 2.80GHz with MMX, SSE1, SSE2, SSE3

│Test: Conversion of a screen buffer from DOS to Windows CHAR_INFO structure
├─────────────────────────────────┬─────────┬──────────┬──────────┬──────────
│        Algorithm notes                 │Proc Size│ Test # 1 │ Test # 2 │ Test # 3 │ Test # 4 │
├─────────────────────────────────┼─────────┼──────────┼──────────┼──────────
│01 Alex / MMX - PUNPCKLBW      │   62    │   12.461 │   11.982 │   11.983 │   11.983 │
├─────────────────────────────────┼─────────┼──────────┼──────────┼──────────
│02 Frank / 486 - MOV-BSWAP       │   43    │   13.188 │   12.949 │   13.194 │   13.353 │
├─────────────────────────────────┼─────────┼──────────┼──────────┼─────────
│03 Frank / XMM - PUNPCKLBW       │   44    │    4.468 │    4.935 │    4.978 │    4.964 │
├─────────────────────────────────┼─────────┼──────────┼──────────┼────────

convert byte string to word string look like convert ansi to unicode No?

frktons

Quote from: ToutEnMasm on November 09, 2010, 06:42:17 PM

OS  : Microsoft Windows XP Professional Service Pack 3 (build 2600)
CPU : Intel(R) Celeron(R) CPU 2.80GHz with MMX, SSE1, SSE2, SSE3

Test: Conversion of a screen buffer from DOS to Windows CHAR_INFO structure
─────────────────────────────────┬─────────┬──────────┬──────────┬──        Algorithm notes                        │Proc Size│ Test # 1 │ Test # 2 │ Test # 3 │ Test # 4 │
─────────────────────────────────┼─────────┼──────────┼──────────┼──
01 Alex / MMX - PUNPCKLBW        │   62    │   12.520 │   12.301 │   12.046 │   12.692 │
─────────────────────────────────┼─────────┼──────────┼──────────
02 Frank / 486 - MOV-BSWAP       │   43    │   13.944 │   15.351 │   13.712 │   14.498 │
─────────────────────────────────┼─────────┼──────────┼──────────
03 Frank / XMM - PUNPCKLBW       │   44    │    4.439 │    4.723 │    4.429 │    4.673 │
─────────────────────────────────┼─────────┼──────────┼──────────


convert byte string to word string look like convert ansi to unicode No?


Yes, that's the same thing, but unicode could have a different second byte other than zero
if they are representing specific languages [chinese, japanese, and so on...]

Converting a byte to a word always means to put a zero in the high byte.
That's the difference.  :U

How did you get this unaligned display?

Frank
Mind is like a parachute. You know what to do in order to use it :-)

ToutEnMasm

#12
QuoteHow did you get this unaligned display?
I have just made a copy from dos.Think you haven't the same resolution than mine (800*600).
If it is that, you can try to use % for the dimension of your windows.

frktons

#13
Quote from: ToutEnMasm on November 09, 2010, 08:00:06 PM

How did you get this unaligned display?

I have just made a copy from dos.Think you haven't the same resolution than mine (800*600).
If it is that, you can try to use % for the dimension of your windows.


Two things:

1] use code instead of quote
2] select the area starting from the border and up tol the opposite border.

And after you can try to post again the results, maybe they will be more
readable.

I changed quote with code and it looks a bit better.  :bg

Frank
Mind is like a parachute. You know what to do in order to use it :-)

clive

┌────────────────────────────────────────────────────────────────────────────────────────
│OS  : Microsoft Windows XP Professional Service Pack 3 (build 2600)
│CPU : Intel(R) Atom(TM) CPU N270 @ 1.60GHz with MMX, SSE1, SSE2, SSE3, SSSE3

│Test: Conversion of a screen buffer from DOS to Windows CHAR_INFO structure
├─────────────────────────────────┬─────────┬──────────┬──────────┬──────────┬──────────┬
│        Algorithm notes          │Proc Size│ Test # 1 │ Test # 2 │ Test # 3 │ Test # 4 │
├─────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┼
│01 Alex / MMX - PUNPCKLBW        │   62    │    9.451 │    8.612 │    8.822 │   11.655 │
├─────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┼
│02 Frank / 486 - MOV-BSWAP       │   43    │   32.153 │   39.735 │   19.326 │   19.554 │
├─────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┼
│03 Frank / XMM - PUNPCKLBW       │   44    │    5.656 │    5.712 │    5.657 │    5.738 │
├─────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┼
It could be a random act of randomness. Those happen a lot as well.