Re: rfc: another switch optimization idea

2013-03-28 Thread Dinar Temirbulatov
sorry, The numbers were too good, something was wrong in my setup. thanks, Dinar, >> before: >>Base Base Base Peak >> Peak Peak >>BenchmarksRef Time Run Time RatioRef Time Run Time Ratio >>---

Re: rfc: another switch optimization idea

2013-03-26 Thread Steven Bosscher
On Tue, Mar 26, 2013 at 10:31 AM, Richard Biener wrote: > On Mon, Mar 25, 2013 at 10:23 PM, Dinar Temirbulatov wrote: >> The error in 252.eon was due to incorrect setup. Also "if (count > >> 3*PARAM_VALUE (PARAM_SWITCH_JUMP_TABLES_BB_OPS_LIMIT))" does not look >> correct, and probably it is better

Re: rfc: another switch optimization idea

2013-03-26 Thread Richard Biener
On Mon, Mar 25, 2013 at 10:23 PM, Dinar Temirbulatov wrote: > Hi, > We noticed some performance gains if we are not using jump over some > simple switch statements. Here is the idea: Check whether the switch > statement can be expanded with conditional instructions. In that case > jump tables shou

Re: rfc: another switch optimization idea

2013-03-25 Thread Ondřej Bílka
On Tue, Mar 26, 2013 at 01:23:58AM +0400, Dinar Temirbulatov wrote: > Hi, > We noticed some performance gains if we are not using jump over some > simple switch statements. Here is the idea: Check whether the switch > statement can be expanded with conditional instructions. In that case > jump tabl

rfc: another switch optimization idea

2013-03-25 Thread Dinar Temirbulatov
Hi, We noticed some performance gains if we are not using jump over some simple switch statements. Here is the idea: Check whether the switch statement can be expanded with conditional instructions. In that case jump tables should be avoided since some branch instructions can be eliminated in furth