On 02/20/2017 09:36 PM, Carlos O'Donell wrote: > On 02/20/2017 11:01 AM, Rajalakshmi Srinivasaraghavan wrote: >> >> On 02/20/2017 07:12 PM, Carlos O'Donell wrote: >>> On 02/14/2017 06:05 AM, Rajalakshmi Srinivasaraghavan wrote: >>>> P7 code is used for <=32B strings and for > 32B vectorized loops are used. >>>> This shows as an average 25% improvement depending on the position of search >>>> character. The performance is same for shorter strings. >>>> Tested on ppc64 and ppc64le. >>> What did you use to test the 25% improvement? >> This improvement is seen when compared to power7. Benchtest is >> modified to use length from 0 to 400 to find the average for >> different lengths. > Could you post your modifications for review an explain your > process in a little more detail. I'm curious about the changes > you made. I modified benchtest/bench-strrchr.c to measure only the following loop and commented the existing 'for' loops. for (i = 0; i < 400; ++i) { do_test (0, i, i + 1, 0, SMALL_CHAR); do_test (i, i, i + 1, 0, BIG_CHAR); } Then the benchtests generated is copied to a spreadsheet to calculate the improvement. Attached is the benchtests result for ppc64le. Note: The numbers vary slightly from run to run. -- Thanks Rajalakshmi S