cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] rawstr: Speed up Curl_raw_toupper by 40%

From: Tim Ruehsen <tim.ruehsen_at_gmx.de>
Date: Mon, 02 Nov 2015 17:00:53 +0100

Just an idea.

At least check
#if ('z' - 'a' == 25) && ('z' - 'a' == 25)
... your code
#else
... old code
#endif

(didn't test it)

Tim

On Monday 02 November 2015 17:49:09 Lauri Kasanen wrote:
> On Mon, 02 Nov 2015 16:39:55 +0100
>
> Tim Ruehsen <tim.ruehsen_at_gmx.de> wrote:
> > Hi Lauri,
> >
> > your code wouldn't work with non-continuous character sets, like EBCDIC.
> >
> > Did you turn on optimization when compiling curl/libcurl ? Any half-way
> > modern compiler should translate the current code into a lookup table or
> > code like yours.
> >
> > Another option would be to check for a continuous character set within
> > configure.ac and provide two code paths.
>
> Hi Tim,
>
> All comparisons were made with -O3 -march=native. Does curl really
> support ebcdic? In 2015?
>
> - Lauri
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-11-02