Re: Fwd: [Patch, fortran] optimize string comparison

2013-03-27 Thread Ondřej Bílka
On Wed, Mar 27, 2013 at 10:20:59AM +0100, Tobias Burnus wrote: > (The email below was only sent to gcc-patches@; I now also CC > fortran@ - sorry for the full quote) > > Regarding the below patch: I think it does not work as-is for > Unicode strings (UCS4, character(kind=4)), where each character

Fwd: [Patch, fortran] optimize string comparison

2013-03-27 Thread Tobias Burnus
memcmp_char4 by #define MEMCMP(a,b,c) memcmp(a,b,4*(c)) and delete the memcmp_char4 function. Tobias * http://gcc.gnu.org/ml/fortran/2013-03/msg00142.html Original Message ---- Subject: [Patch, fortran] optimize string comparison Date: Wed, 27 Mar 2013 09:35:57 +0100 From: Ondř

[Patch, fortran] optimize string comparison

2013-03-27 Thread Ondřej Bílka
Hi, as I looked to compare_string I discovered that it could be optimized. This speeds up case when strings are equal but we must check padding where checking it byte by byte is suboptimal. Ondra 2013-03-27 Ondřej Bílka * libgfortran/intrinsics/string_intrinsics_inc.c (compare_strin