News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

I am not a spambot ...

Started by rrr314159, January 01, 2015, 12:32:35 PM

Previous topic - Next topic

rrr314159

Thanks all .. after a good night's rest I put in an all-dayer, and got over the hump ... starting to convert some of my old projects. It's challenging, but what else am I going to do with all this free time? BTW Siekmanski, that was a great haircut.
I am NaN ;)

jj2007

Quote from: hutch-- on January 02, 2015, 07:50:41 PMI still have a lot to do in 32 bit and its far more elegant within its capacity.

I fully agree. Quote from an old post:
Quote
64-bit certainly is the future, but 32-bit will be around for a long while. I am still using 16-bit apps, even on a Win7-64 system in a VM.

As to speed, it still has to be proven that 64-bit apps are faster. You rarely run out of registers, especially in fast innermost loops that won't call slow Win APIs. And 64-bit code eats up cache, so on balance it's hard to prove that 64-bit code is "faster". Of course, there will be quite a number of applications that can be done faster, e.g. for videos or image processing.

But the transition 32->64 cannot be compared to the (still incomplete) 16->32 bit transition. When porting 16-bit code to 32 bits, you get a huge speedup, and the address space jumps from a tiny 65K to 4 gigs. To visualise that step: a typical 500*600 pixel JPG fits into 65k (so 16 bits of address space are indeed a little bit tight :(). The largest Hubble image so far is 15852*12392 pixel, that requires a 3x2.5 meter screen. To fill the 4 gigs of 3-bit mode address space, you need a 180x150 meter screen. I can afford my notebook, but I cannot afford a screen as large as two football camps...

IMHO it's 99% a marketing trick to force users buying new hardware. And 32-bit code still runs absolutely fine on Windows, and will continue to run fine throughout this century :biggrin:

Gunther

Jochen,

Quote from: jj2007 on January 03, 2015, 07:24:09 PM
IMHO it's 99% a marketing trick to force users buying new hardware. And 32-bit code still runs absolutely fine on Windows, and will continue to run fine throughout this century :biggrin:

that's debatable. What you call a marketing trick is in most cases brutal reality. Please, try to buy a computer without a 64-bit operating system pre-installed, at least here in Germany. Perhaps there's another situation in Italy. Of course, we could clean the entire disk from the pre-installed garbage and configure the machine to our taste. But the average user can't do this, I think.

Gunther
You have to know the facts before you can distort them.

daydreamer

my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

rrr314159

Good 2 meet u, daydreamer2!

Re 32 vs 64, must admit that originally I thot 64 bit was necessary for XMM/YMM registers; that's why I particularly wanted it. Turns out that's not the case, but still, 32-bit ML gives me only the first 8 YMM's; ML64 (or equivalent) does all 16. That's a hardware limitation, not just crippled software, I believe (please correct me if wrong). The extended REX.R encoding (or whatever it is) requires 64-bit mode to provide the extra bit to specify the top 8 registers. There also seem to be some extra instructions available - but not sure, I'll be able to tell you in a while. Unfortunately 64-bit does NOT seem to support (most) integer ops on YMM, and no FMA, scatter/gather, etc. I thot they'd come with ML64 (or, as it turns out, I'm using JWasm); but, I'm afraid, they're not in the hardware at all. At any rate, the extra 8 YMM registers is a huge plus. And of course, the extra 8 GPR's are very nice also (twice the width, too). jj2007, I can't agree that "You rarely run out of registers" with the old 8. Don't forget that's really just 6, since ebp and esp are usually dedicated elsewhere; the increase is not merely 8 to 16, but 6 to 14. I constantly find (I mean, found) myself juggling them, and "spilling" them, and wishing there were more.

Then there's the much simpler 64 architecture; only fastcall, no stdcall or anything else! (Full disclosure - I never knew or cared anything about this until recently, reading 64-bit propaganda, but you've got to admit it's a good thing). No segment registers, direct addressing of more bytes than you'll ever need. Let's face it, 2GB is not enough. But again, must admit I've never actually used more than a fraction of that. And then there's stack alignment, and no doubt other issues waiting to bite me... jj2007, u cld be right that altho these things sound great, in practice the benefit may not be all that much.

So I'll stick with my first point only: those xtra registers (both YMM and GPR) are really liberating (i'm talking inner loop, of course). Like taking off a suit 2 sizes too small and putting on one that fits.

Another reason: all my computers, even old retired ones, are 64-bit. Writing in 32 bits is like having a Ferrari you only drive 30 mhp (48.2803 kph, Gunther) around town; sooner or later you want to take it out on the highway. Edmund Hillary, asked why he wanted to climb Mt Everest, replied "because it's there". He was right!

Bottom line, 32-bit is also good; the difference between that and 64 is much less than 16 up to 32, or 8 to 16. That will change within a decade when peripherals (such as screens) start to require much more memory, but currently, 32 is adequate. So, u pays your money and u takes your choice ...
I am NaN ;)

hutch--

I see 64 bit as the future but perhaps not the version we have at the moment, its something like what happened with the shift from 16 to 32 bit, a lot of hybrid code for a long time and silly limits to what you could do. A i386 could just handle 32 bit instructions but we did not see 32 bit code until early WinNT and Win95 for the consumer market when just about everyone was running an early Pentium.

On current 64 bit there is not enough memory, you need terabytes to make it viable where 32 gig is not up to scratch. Then you need full long mode 64 bit, not half and half hybrids. 32 bit code is not without its virtues but there are a number of disciplines that make register usage a non issue. No stack frame procs where it matter give you EBP as well and up to 3 register FASTCALL (roll your own) removes the stack corrections required with a no stack frame procedure. With Win32 you could do STDCALL, C and FASTCALL, in Win64 you are strangled with the horrible stack corrections and hybrid FASTCALL/STACK combinations. This means you have 7 GP registers, 8 MMX and 8 XMM registers and if you have late enough hardware, the later versions as well.

habran

Hi rrr314159 :biggrin:
I think that you are a very advanced bot,because you have a great sense of humor and ability to think logically,  so welcome to the forum :t
You are perfectly right when choosing 64 bit (Ferrari) and JWasm
The JWasm will take care of a stack alignment for you and many other things
If you payed attention to what is happening on this forum you will realize that my version of JWasm is much more advanced than original
and I am still working on improvement of it
32 bit is like driving an old car from sixties with no power steering, no air bags, using 20 liters of fuel for 100k and polluting the environment
I prefer the new Ferrari  on highway :t
Cod-Father

jj2007

Quote from: habran on January 05, 2015, 02:21:40 PM
32 bit is like driving an old car from sixties with no power steering, no air bags, using 20 liters of fuel for 100k and polluting the environment
I prefer the new Ferrari  on highway :t

Habran, my old friend, you are exaggerating a little bit! Benchmark-wise, your Ferrari is at most (on special highways) 2-3% faster than my trusty old Volkswagen, and comfort-wise, I would always prefer the Golf :bgrin:

Besides, with all those speedlimits around, I would never have an occasion to use the 2-3% more...

habran

Hey jj2007 :biggrin:
What about air conditioner, here is now between 35 and 45 Celsius, you would die in your trusty old Volkswagen
Golf is good car if it is a new one :t
It is not 2-3% faster, it is like you are using one hand instead of both, my old friend :P
:greenclp: this is 64 bit
:eusa_clap: this is 32 bit
Cod-Father

Siekmanski

I'm still driving very fast in my 64 bit BMW Mini Cooper S with 32 bit fuel on the Dutch highways.
Maybe in the future i'll fill it up with 64 bit fuel and test it on the German highways.  8)
Creative coders use backward thinking techniques as a strategy.

habran

Are German highways still with unlimited speed?
40 years ago people would drive Porsches 250K(64bit), passing my sister's second hand Audi 100S witch was going top speed of 170K(32bit), like we were parked on the right side of the highway (Minhen-Salsburg) :lol:
Cod-Father

habran

This is coming with AVX-512:
Quote
ZMM0     YMM0     XMM0
ZMM1     YMM1     XMM1
ZMM2     YMM2     XMM2
ZMM3     YMM3     XMM3
ZMM4     YMM4     XMM4
ZMM5     YMM5     XMM5
ZMM6     YMM6     XMM6
ZMM7     YMM7     XMM7
ZMM8     YMM8     XMM8
ZMM9     YMM9     XMM9
ZMM10   YMM10   XMM10
ZMM11   YMM11   XMM11
ZMM12   YMM12   XMM12
ZMM13   YMM13   XMM13
ZMM14   YMM14   XMM14
ZMM15   YMM15   XMM15
ZMM16   YMM16   XMM16
ZMM17   YMM17   XMM17
ZMM18   YMM18   XMM18
ZMM19   YMM19   XMM19
ZMM20   YMM20   XMM20
ZMM21   YMM21   XMM21
ZMM22   YMM22   XMM22
ZMM23   YMM23   XMM23
ZMM24   YMM24   XMM24
ZMM25   YMM25   XMM25
ZMM26   YMM26   XMM26
ZMM27   YMM27   XMM27
ZMM28   YMM28   XMM28
ZMM29   YMM29   XMM29
ZMM30   YMM30   XMM30
ZMM31   YMM31   XMM31
Cod-Father

Siekmanski

As far as I know if there are no other signs than this one,

you can drive as fast as you want.

We have to ask Gunther if there's still no speed limit auf der autobahn.
Creative coders use backward thinking techniques as a strategy.

hutch--

The hardware is usually well in front of the software, the i386 was hot stuff in 1989 but it was strangled by DOS. Having lots of registers is fine but saddling it with 64 bit current Windows strangles it. When we have terabytes of memory, win64 will be a big deal but at the moment the OS design cannot fully use the x64 architecture.

anunitu

I am thinking not unlike some things that just "came along" out of nowhere(They really only hit the public after many years) something is coming down the pike that will likely change everything. Funny thing sometimes,just one little innovation can unlock a whole flood of advancement in many areas.
A coming together in a sense,I think its called the "Internet of things" now.
http://www.theguardian.com/technology/2014/jun/08/internet-of-things-coming-together-tech-revolution

also the singularity   http://en.wikipedia.org/wiki/Technological_singularity


Lets all welcome the terminator,and realize it is US!!