Performance: linux vs Windows vs Mac OS X

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
abulmo
Posts: 151
Joined: Thu Nov 12, 2009 5:31 pm
Contact:

Re: Performance: linux vs Windows vs Mac OS X

Post by abulmo » Wed Dec 02, 2009 6:40 am

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: 20776
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Performance: linux vs Windows vs Mac OS X

Post by bob » Wed Dec 02, 2009 6:57 am

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.

Post Reply