News:

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

This is too slow

Started by frktons, November 18, 2010, 03:10:21 AM

Previous topic - Next topic

frktons

Quote from: Antariy on November 19, 2010, 12:57:37 AM

........
Main PROC
invoke GetLocaleInfo,LOCALE_USER_DEFAULT,LOCALE_STHOUSAND,offset Tsep,4 ; THIS IS INSERTED
invoke CharToOem,offset Tsep,offset Tsep ; THIS IS INSERTED

    mov RowInitialFile, One   
    mov RowFinalFile,   MaxRows   
    mov ColInitialFile, One   
    mov ColFinalFile,   MaxCols 
.........


:P
Alex

The results you posted don't show point or comma separators, so what kind of display we get
with these two added instructions?

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

Antariy

Quote from: frktons on November 19, 2010, 01:00:00 AM
The results you posted don't show point or comma separators, so what kind of display we get
with these two added instructions?

That is question for MS - why they are think that here is used non-breakable space for an Thousands separator. Probably they know better, which kind of separators is used European peoples.
This code shoud return and convert to OEM the separator of 1000ds. And it do this - it return sparator which is provided by OS relatively to locale settings. This is not bug of code - this is decision of OS which char to return.



Alex

frktons

Quote from: Antariy on November 19, 2010, 01:04:03 AM
That is question for MS - why they are think that here is used non-breakable space for an Thousands separator. Probably they know better, which kind of separators is used European peoples.
This code shoud return and convert to OEM the separator of 1000ds. And it do this - it return sparator which is provided by OS relatively to locale settings. This is not bug of code - this is decision of OS which char to return.

Alex

On my pc I get:



┌─────────────────────────────────────────────────────────────[19-Nov-2010 at 01:07 GMT]─┐
│OS  : Microsoft Windows 7 Ultimate Edition, 64-bit (build 7600)                         │
│CPU : Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz with 2 logical core(s) with SSSE3           │
├──────────────────────────────────┬─────────┬──────────┬──────────┬──────────┬──────────┤
│        Algorithm notes           │Proc Size│ Test # 1 │ Test # 2 │ Test # 3 │ Test # 4 │
├──────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┤
│01 ustrv$ + GetNumberFormat       │    95   │   45.524 │   45.230 │   45.316 │   45.084 │
├──────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┤
│02 udw2str + GetNumberFormat      │    65   │   45.406 │   45.070 │   45.114 │   45.248 │
├──────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┤
│03 wsprintf + GetNumberFormat     │    73   │   52.217 │   52.330 │   52.267 │   52.196 │
├──────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┤
│04 Clive - IDIV and Stack         │   120   │    3.006 │    3.008 │    3.000 │    3.006 │
├──────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┤
│05 Clive - reciprocal IMUL        │   157   │    1.966 │    1.984 │    1.998 │    1.951 │
├──────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┤

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

Antariy

Quote from: frktons on November 19, 2010, 01:07:10 AM
On my pc I get:

And this is right results for European country  :wink

GregL

I get a comma.

Quote from: Alex... but most of users use "." as thousands separator here.
Australia, Canada, U.S.A. and UK among others use a comma.

frktons

Quote from: Antariy on November 19, 2010, 01:09:50 AM
And this is right results for European country  :wink

Now let's see what other countries get  :lol

Thanks Alex, always very helpful.  :U
Mind is like a parachute. You know what to do in order to use it :-)

Antariy


┌─────────────────────────────────────────────────────────────[19-Nov-2010 at 01:12 GMT]─┐
│OS  : Microsoft Windows XP Professional Service Pack 2 (build 2600)                     │
│CPU : Intel(R) Celeron(R) CPU 2.13GHz with 1 logical core(s) with SSE3                  │
├──────────────────────────────────┬─────────┬──────────┬──────────┬──────────┬──────────┤
│        Algorithm notes           │Proc Size│ Test # 1 │ Test # 2 │ Test # 3 │ Test # 4 │
├──────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┤
│01 ustrv$ + GetNumberFormat       │    95   │   74 098 │   72 932 │   72 492 │   72 319 │
├──────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┤
│02 udw2str + GetNumberFormat      │    65   │   71 791 │   71 894 │   71 039 │   70 818 │
├──────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┤
│03 wsprintf + GetNumberFormat     │    73   │   90 070 │   90 501 │   91 407 │   90 484 │
├──────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┤
│04 Clive - IDIV and Stack         │   120   │    9 060 │    9 605 │    8 791 │    8 743 │
├──────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┤
│05 Clive - reciprocal IMUL        │   157   │    3 785 │    3 444 │    3 575 │    3 566 │
├──────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┤


frktons

Quote from: GregL on November 19, 2010, 01:10:33 AM
I get a comma.

Quote from: Alex... but most of users use "." as thousands separator here.
Australia, Canada, U.S.A. and UK among others use a comma.


About half population use comma and about half use point, more or less, now all should be happy  :lol
Mind is like a parachute. You know what to do in order to use it :-)

Antariy

Quote from: GregL on November 19, 2010, 01:10:33 AM
I get a comma.

Quote from: Alex... but most of users use "." as thousands separator here.
Australia, Canada, U.S.A. and UK among others use a comma.

When I sayed "here" I meant here - in my country and in Europe.  :lol



Alex

frktons

Quote from: Antariy on November 19, 2010, 01:11:26 AM

┌─────────────────────────────────────────────────────────────[19-Nov-2010 at 01:12 GMT]─┐
│OS  : Microsoft Windows XP Professional Service Pack 2 (build 2600)                     │
│CPU : Intel(R) Celeron(R) CPU 2.13GHz with 1 logical core(s) with SSE3                  │
├──────────────────────────────────┬─────────┬──────────┬──────────┬──────────┬──────────┤
│        Algorithm notes           │Proc Size│ Test # 1 │ Test # 2 │ Test # 3 │ Test # 4 │
├──────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┤
│01 ustrv$ + GetNumberFormat       │    95   │   74 098 │   72 932 │   72 492 │   72 319 │
├──────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┤
│02 udw2str + GetNumberFormat      │    65   │   71 791 │   71 894 │   71 039 │   70 818 │
├──────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┤
│03 wsprintf + GetNumberFormat     │    73   │   90 070 │   90 501 │   91 407 │   90 484 │
├──────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┤
│04 Clive - IDIV and Stack         │   120   │    9 060 │    9 605 │    8 791 │    8 743 │
├──────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┤
│05 Clive - reciprocal IMUL        │   157   │    3 785 │    3 444 │    3 575 │    3 566 │
├──────────────────────────────────┼─────────┼──────────┼──────────┼──────────┼──────────┤



Alex in your country you use a space separator?
Mind is like a parachute. You know what to do in order to use it :-)

Antariy

Quote from: frktons on November 19, 2010, 01:13:40 AM
Alex in your country you use a space separator?

Should be

Quote from: frktons on November 19, 2010, 01:13:40 AM
Alex, MS think  that in your country you used a space separator.

:bg

GregL

Quote from: AlexWhen I sayed "here" I meant here - in my country and in Europe.  lol

Oh, I thought you meant users here in the forum. :lol


frktons

Quote from: Antariy on November 19, 2010, 01:17:10 AM
Quote from: frktons on November 19, 2010, 01:13:40 AM
Alex in your country you use a space separator?

Should be

Quote from: frktons on November 19, 2010, 01:13:40 AM
Alex, MS think  that in your country you used a space separator.

:bg

:lol :lol :lol :dazzled: :dazzled: :dazzled: :lol :lol :lol :dazzled: :dazzled: :dazzled: :dazzled: :lol :lol :lol

Going to sleep now. Enjoy.

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

Antariy


dedndave

i am sure there is a function you can call to get the right seperator for the user's country/code page   :P