Re: [Mesa-dev] [PATCH 02/12] glcpp: Avoid unnecessary strcmp()

2017-01-18 Thread Ian Romanick
This patch is Reviewed-by: Ian Romanick I'd also accept a follow-up patch that fixes the formatting of multi-line comments in this function (file?) by putting the closing */ on its own line. :) On 01/07/2017 11:02 AM, Vladislav Egorov wrote: > strcmp() is slow. Initiate comparison with "__LINE_

[Mesa-dev] [PATCH 02/12] glcpp: Avoid unnecessary strcmp()

2017-01-07 Thread Vladislav Egorov
strcmp() is slow. Initiate comparison with "__LINE__" or "__FILE__" only if the identifier starts with '_', which is rare. --- src/compiler/glsl/glcpp/glcpp-parse.y | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/compiler/glsl/glcpp/glcpp-parse.y b/src/compi