Performance: linux vs Windows vs Mac OS X

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

abulmo
Posts: 151
Joined: Thu Nov 12, 2009 6:31 pm

Re: Performance: linux vs Windows vs Mac OS X

Post by abulmo »

shiv wrote:For PGO optimization to work, the profiling run should be typical of normal program execution (in terms of the branching decisions made). If the program is not branch intensive or if the profiling run is not typical of the actual run, PGO probably will not help. Wonder if this holds for your program.
Many intensive tasks (evaluation function, move generation) of my program indeed use branchless algorithms.
shiv wrote:I apologize for stating the obvious, but the fact that PGO makes performance worse does appear somewhat odd.
Your right, my data for worse performance were old and I might have poorly tested PGO at this time. I retried the idea and all compiler get better performance with PGO, but the speed increase is really small, about 1%, which is within the variability of my performance test (due to parallel search that gives less reproducible results).
Richard
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Performance: linux vs Windows vs Mac OS X

Post by bob »

abulmo wrote:
shiv wrote:For PGO optimization to work, the profiling run should be typical of normal program execution (in terms of the branching decisions made). If the program is not branch intensive or if the profiling run is not typical of the actual run, PGO probably will not help. Wonder if this holds for your program.
Many intensive tasks (evaluation function, move generation) of my program indeed use branchless algorithms.
shiv wrote:I apologize for stating the obvious, but the fact that PGO makes performance worse does appear somewhat odd.
Your right, my data for worse performance were old and I might have poorly tested PGO at this time. I retried the idea and all compiler get better performance with PGO, but the speed increase is really small, about 1%, which is within the variability of my performance test (due to parallel search that gives less reproducible results).
There is much to consider in a parallel search. Cache issues can be paramount, because two separate caches (such as two or four L1 caches on a dual or quad-core box) can generate a ton of inter-cache forwarding traffic if you are sloppy in how you lay stuff out in memory so that two processors frequently access data that lies within the same cache line. PGO can't do much for a program other than to prevent cache from prefetching unused data, by rearranging things as needed to avoid fetching blocks of instructions that are generally skipped over. Anything else is going to be up to the normal optimizer which won't be improved at all by PGO.