Re: new module 'errno'

2008-09-14 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 9/13/2008 4:41 PM: > Hi Paolo and others, > > Here's the module 'errno'. It provides a complete POSIX . Cygwin currently fails this because it lacks ECANCELED. > > # ifndef ECANCELED > # define ECANCELED 136 > # defin

Re: [PATCH] Implement premature termination of compareseq.

2008-09-14 Thread Bruno Haible
Ralf Wildenhues wrote: > * lib/fstrcmp.c (EXTRA_CONTEXT_FIELDS): New field edit_count_limit. > (CHECK_CONDITION): New define; check if the bound has been reached. > (fstrcmp_internal): New argument 'bound', used to compute > edit_count_limit. Return zero if the limit has been reached. > ctxt.e

Re: [PATCH] New function fstrcmp_if_higher.

2008-09-14 Thread Bruno Haible
Hi Ralf, An excellent patch! I measure a speedup of "msgmerge af.po coreutils.pot" from 376 sec. to 152 sec. I changed your patch a bit 1. to avoid new function calls - more inlining. 2. to include a formal proof of the upper bound. 3. To leave the modified fstrcmp function the freedom what

[PATCH]: update tls and lock tests to use newer glthread API

2008-09-14 Thread Yoann Vandoorselaere
Hi, Attached is a patch implementing the following glthread fixes: - Correct pthread_atfork() detection. - Add the missing cond-tests module. - Make 'lock-tests' and 'tls-tests' depend on the thread and yield module, use YIELD_LIBS in place of the deprecated LIBSCHED variable, and update 'lock-

Re: [PATCH] Implement premature termination of compareseq.

2008-09-14 Thread Bruno Haible
Hi Ralf, Both of your optimization ideas are excellent. A 4x speedup for msgmerge is not something that I'm seeing every day!! Let me start by committing the diffseq.h change. I'm changing the macro to not include the 'return' statement, just the condition expression. And when the condition has e

Re: new module 'errno'

2008-09-14 Thread Paolo Bonzini
Great, I will remove the relevant code from my sys_socket module and make it dependent on errno. I will also modify it to do errno = (err < 10025 ? err - 1 : err == WSAENAMETOOLONG ? ENAMETOOLONG : err == WSAENOTEMPTY ? ENOTEMPTY : err); Thanks, Paolo

new module 'perror'

2008-09-14 Thread Bruno Haible
This extends 'perror' so that it knows about the added errno values. 2008-09-14 Bruno Haible <[EMAIL PROTECTED]> New module 'perror'. * lib/stdio.in.h (perror): New declaration. * lib/perror.c: New file. * m4/perror.m4: New file. * modules/perror: New fil

[PATCH] Implement premature termination of compareseq.

2008-09-14 Thread Ralf Wildenhues
* lib/diffseq.h (CHECK_CONDITION): New required define; may be empty. (compareseq): Use it after each note, and recursive compareseq invocation. * lib/fstrcmp.c (EXTRA_CONTEXT_FIELDS): New field edit_count_limit. (CHECK_CONDITION): New define; check if the bound has been reached. (fstrcmp_internal)

[PATCH] New function fstrcmp_if_higher.

2008-09-14 Thread Ralf Wildenhues
* lib/fstrcmp.c (fstrcmp_internal): Static rename from fstrcmp, also take string lengths as arguments. (fstrcmp): New, thin public wrapper around fstrcmp_internal. (fstrcmp_upper_bound): New function, for fast fstrcmp estimate. (fstrcmp_if_higher): New function, to compute fstrcmp value only if it

msgmerge speedup: fstrcmp and diffseq improvements

2008-09-14 Thread Ralf Wildenhues
Hello Bruno, all, msgmerge is slow: merging of outdated coreutils .po files takes roughly 12 minutes here. gcov shows that more than 99% of the time is spent in compareseq/diag, called from fstrcmp, called indirectly from message_list_search_fuzzy. At the heart of the fstrcmp code, a modified sc