gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-1971-gaf43ba


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-1971-gaf43bad
Date: Mon, 29 Aug 2016 02:59:12 +0000 (UTC)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, master has been updated
       via  af43bad53b2f05ba0d4403a59433f587a1e32b22 (commit)
      from  00682d87a1a1c0535c0fa5adb27867578dc76d49 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=af43bad53b2f05ba0d4403a59433f587a1e32b22

commit af43bad53b2f05ba0d4403a59433f587a1e32b22
Author: Arnold D. Robbins <address@hidden>
Date:   Mon Aug 29 05:58:49 2016 +0300

    Use fwrite_unlocked if it exists. Nice speedup in output.

diff --git a/ChangeLog b/ChangeLog
index 75d1bd3..023fa88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-08-29         Aharon Robbins       <address@hidden>
+
+       * configure.ac (fwrite_unlocked): Check for it.
+       * awk.h (fwrite): Define to fwrite_unlocked if we have it.
+       * NEWS: Make note of speed improvement.
+
 2016-08-25         Arnold D. Robbins     <address@hidden>
 
        POSIX now says use strcmp for == and !=. Thanks to Chet Ramey
diff --git a/NEWS b/NEWS
index e4ec58f..7163ecf 100644
--- a/NEWS
+++ b/NEWS
@@ -76,6 +76,9 @@ Changes from 4.1.x to 4.2.0
 19. The extension API now provides a mechanism for generating nonfatal
     error messages.
 
+20. Gawk now uses fwrite_unlocked if it's available. The yields a 7% - 18%
+    improvement in raw output speed (gawk '{ print }' on a large file).
+
 Changes from 4.1.3 to 4.1.4
 ---------------------------
 
diff --git a/TODO b/TODO
index e9e5e19..bafb82c 100644
--- a/TODO
+++ b/TODO
@@ -15,8 +15,6 @@ TODO
 Minor Cleanups and Code Improvements
 ------------------------------------
 
-       Use fwrite_unlocked if available. Brings about 7% speedup for output.
-
        API:
                ??? #if !defined(GAWK) && !defined(GAWK_OMIT_CONVENIENCE_MACROS)
 
diff --git a/awk.h b/awk.h
index 2234abf..edd9cb9 100644
--- a/awk.h
+++ b/awk.h
@@ -178,6 +178,10 @@ extern void *memset_ulong(void *dest, int val, unsigned 
long l);
 #define memset memset_ulong
 #endif
 
+#ifdef HAVE_FWRITE_UNLOCKED
+#define fwrite fwrite_unlocked
+#endif /* HAVE_FWRITE_UNLOCKED */
+
 #if defined(__EMX__) || defined(__MINGW32__)
 #include "nonposix.h"
 #endif /* defined(__EMX__) || defined(__MINGW32__) */
diff --git a/configh.in b/configh.in
index 478f712..41f63d4 100644
--- a/configh.in
+++ b/configh.in
@@ -48,6 +48,9 @@
 /* Define to 1 if you have the `fmod' function. */
 #undef HAVE_FMOD
 
+/* Define to 1 if you have the `fwrite_unlocked' function. */
+#undef HAVE_FWRITE_UNLOCKED
+
 /* have getaddrinfo */
 #undef HAVE_GETADDRINFO
 
diff --git a/configure b/configure
index c995535..1fd6e4e 100755
--- a/configure
+++ b/configure
@@ -9811,6 +9811,7 @@ esac
 
 # Need the check for mkstemp and tmpfile for missing_d/snprintf.c.
 for ac_func in __etoa_l atexit btowc fmod getgrent getgroups grantpt \
+       fwrite_unlocked \
        isascii iswctype iswlower iswupper mbrlen \
        memcmp memcpy memcpy_ulong memmove memset \
        memset_ulong mkstemp posix_openpt setenv setlocale setsid sigprocmask \
diff --git a/configure.ac b/configure.ac
index bfe785d..518a739 100644
--- a/configure.ac
+++ b/configure.ac
@@ -264,6 +264,7 @@ esac
 
 # Need the check for mkstemp and tmpfile for missing_d/snprintf.c.
 AC_CHECK_FUNCS(__etoa_l atexit btowc fmod getgrent getgroups grantpt \
+       fwrite_unlocked \
        isascii iswctype iswlower iswupper mbrlen \
        memcmp memcpy memcpy_ulong memmove memset \
        memset_ulong mkstemp posix_openpt setenv setlocale setsid sigprocmask \

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog    |    6 ++++++
 NEWS         |    3 +++
 TODO         |    2 --
 awk.h        |    4 ++++
 configh.in   |    3 +++
 configure    |    1 +
 configure.ac |    1 +
 7 files changed, 18 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]