Two performance questions

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
Post Reply
User avatar
invictius
Banned User
Posts: 432
Joined: Fri Aug 03, 2012 6:44 am

Two performance questions

Post by invictius »

What's the performance difference between 32 and 64 bit? I think someone said 50% or double.

What performance increase do you get from a one generation increase in memory bus? E.g going from ddr to ddr2.
User avatar
ramon.dexter
Posts: 1562
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: Two performance questions

Post by ramon.dexter »

Thats not much about peformance. 64 bit just allows you to adress more space. On 32bit, you are limited to 4gigs of memory. End, you cannot have more.
User avatar
Rachael
Posts: 13960
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Two performance questions

Post by Rachael »

32-bit also has extremely limited register usage.

Think of it this way: With more registers you can do more data look-ups (and your code will be optimized better) without having to reference memory. While this is mitigated somewhat by CPU cache, it still is way better to stick as much as you can into registers, and part of a compiler optimizer's job is to look up what registers aren't being used and put what would be memory lookups into them instead of letting the lookups actually occur, which would slow down the entire program.

Sometimes, a small simple function that uses a volatile variable or a small number of them (non-static and is never used elsewhere in the program) will be rewritten by an optimizer to make use of these registers and use no memory whatsoever, nor use any stack or heap.

So the way that this benefits 64-bit programs is with the larger number of registers available, more complex functions can be properly optimized, causing them to run MUCH faster than previously possible with 32-bit programs.
User avatar
Kappes Buur
 
 
Posts: 4184
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada
Contact:

Re: Two performance questions

Post by Kappes Buur »

invictius wrote: What performance increase do you get from a one generation increase in memory bus? E.g going from ddr to ddr2.
Memory performance is tightly dictated by CPU performance. With faster CPU execution speed you need faster memory.

And since DDR, DDR2, DDR3 etc are not compatible backwards or forwards, you might as well ask what performance increase you get with various CPUs.

Improvements can be made by the use of more ram.
Using a 32 bit OS you are essentially tight to 4GB of ram, but, using a 64 bit OS you can have as much ram as the motherboard will allow, it is usually 16GB.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49235
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Two performance questions

Post by Graf Zahl »

On the same hardware, for hardware rendering the difference is minor as the code that performs this does not depend on tight loops with high performance demands.
For software rendering it looks quite different and some significant improvements can be seen.

But all that pales compared to the difference between CPU generations.
User avatar
invictius
Banned User
Posts: 432
Joined: Fri Aug 03, 2012 6:44 am

Re: Two performance questions

Post by invictius »

Graf Zahl wrote:On the same hardware, for hardware rendering the difference is minor as the code that performs this does not depend on tight loops with high performance demands.
For software rendering it looks quite different and some significant improvements can be seen.

But all that pales compared to the difference between CPU generations.
How about cpu cache - such as comparing celerons and semprons to their big brothers within the same generation? I recall it making a lot of difference for the various Quake engine games.
User avatar
Rachael
Posts: 13960
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Two performance questions

Post by Rachael »

It's the same thing. The more the CPU keeps localized and in-house, the faster it will run. Bigger cache has a huge effect on this. The CPU performs memory lookups like usual, but if it does the same lookup over and over again or writes to the same memory address repeatedly, it does not have to access the system memory to do its operations. Bigger cache means that the CPU can do many more operations before it has to access the system RAM again, and has particular benefits with things like software rendering where the same data is repeatedly accessed. (Yes, Quake being among them)

Here's a bit more info about how it works.
User avatar
invictius
Banned User
Posts: 432
Joined: Fri Aug 03, 2012 6:44 am

Re: Two performance questions

Post by invictius »

Can anyone rank cache, cpu speed, memory bus and video card in terms of importance for both gz and zdoom? Obviously video card would be top for gz.
User avatar
leileilol
Posts: 4449
Joined: Sun May 30, 2004 10:16 am
Preferred Pronouns: She/Her
Location: GNU/Hell

Re: Two performance questions

Post by leileilol »

Quake has a surface cache in which all the textures with their lightmaps blended that only updates when a light in a scene changes or when the player traverses the map (progressively shuffling distant surfaces to smaller areas in the cache while closer surfaces into a larger area). The span driver that draws the walls sample texels from this surface cache. It saves a whole lookup, and Abrash's assembly for the span driver leverages the pentium's pipelines to do it twice as fast.

Doom has no such system.
Spoiler:
Post Reply

Return to “General”