Photoshop & 64-bit registers

When reading about the advantages of 64-bit computing, you’ll sometimes hear that 64-bit chips offer more processor registers, and that using these registers will make apps faster. As I wrote last year when revealing Adobe’s 64-plans for Photoshop, PS does see a slight performance gain in 64-bit mode:

In our testing, when the app isn’t using a large data set (one that would otherwise require memory swapping), the speedup due to running in 64-bit mode is around 8-12%.

I asked some of the senior Photoshop engineers for background on why the impact of extra registers is pretty low.

“Most of the code we’ve identified as performance bottlenecks was long ago optimized, and in some cases hand-optimized,” replied Jon Clauson. “Such code really doesn’t get any faster because the processor/compiler has more registers to play with. We were happy we saw a general 8-12%.” He also noted that in many cases, Photoshop is not processor-bound, but rather memory bandwidth-bound.

Photoshop architect Russell Williams offered a bit longer answer:

Much of the performance-critical code is tuned not just for few general-purpose registers, but to use SSE, and those registers don’t change size with the move to 64 bits: SSE registers are still 128 bits.

The speedup on compiled C code when going from 32 to 64 bits on Intel varies widely depending on how much the compiler needs those extra registers and how much of the cache is taken up by pointers and bigger ints. Even when it looks like you ought to be getting a bigger win because of the extra registers, the win is less than you’d think because of the heavy hardware and compiler emphasis put on optimizing the loads and stores generated by temporary register spillage. (They’ve been trying to minimize the impact of that limited register set for a long time.)

Russell also pointed out some ExtremeTech benchmarks showing a mixed bag for running real-world apps in 32- vs. 64-bit mode.

Again, to be clear, none of this means that 64-bit isn’t great. It is. It’s just not some magic can of go-fast juice.

[Note: All my 64-bit-related posts, including coverage of third-party Photoshop plug-ins ported to 64-bit so far, are in this blog’s 64-bit category.]

4 thoughts on “Photoshop & 64-bit registers

  1. Can of go-fast juice! I’ll take a truck load. But seriously, thanks for the 64-bit explanations and the all the hard work you guys do.

  2. Hello John and All
    For more speed in processing, I would suggest going to a solid state drive with a good controller.
    My system (core i7 2.66 8mb,x58chipset,nvidia 4850 and Asus P6T MOBO, DDR3 RAM) was FAST with my Raptor 10,0000rpm drives but is now unbelievable with OCZSummit 120gb SSD.
    There is NO lag time in any filter that applies an affect across all pixels relatively equally but the real advantage are complex filters that create affects by comparing one pixel to its area neigbours and others thoughout large chip DSLRs.
    I have measured filters that took 5.75 minutes on an image to now less than 1.25.
    The bottleneck for speed was the drive, not PSCS4 or the processors.(I tested in 64 bit and 32 bit and found same small gains)
    I can probably gain a bit more speed by replacing the 74gb Raptor I use as my PS scratch drive with a 60gb SSD.
    Does anybody at PS/Adobe have a practical benchmark test that we could apply and report on?

Leave a Reply

Your email address will not be published. Required fields are marked *