[Top][All Lists]

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

[gawk-diffs] [SCM] gawk branch, feature/fixtype, updated. gawk-4.1.0-189

From: Andrew J. Schorr
Subject: [gawk-diffs] [SCM] gawk branch, feature/fixtype, updated. gawk-4.1.0-1895-gf8424b2
Date: Wed, 6 Jul 2016 22:11:52 +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, feature/fixtype has been updated
       via  f8424b236fabb881cc977b9e8e2e7c8debf56da0 (commit)
      from  5de217ef7d347b8afa6f6f1fbd20cb84a20ae187 (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 -----------------------------------------------------------------

commit f8424b236fabb881cc977b9e8e2e7c8debf56da0
Author: Andrew J. Schorr <address@hidden>
Date:   Wed Jul 6 18:11:10 2016 -0400

    Now that all fields are NUL-terminated, we can eliminate $n copying in the 

diff --git a/ChangeLog b/ChangeLog
index 2699ef0..1eb2fa0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2016-07-06         Andrew J. Schorr     <address@hidden>
+       * interpret.h (Op_field_spec): Now that all $n field values are
+       NUL-terminated, there is no reason to call dupnode for $n where n > 0.
+       This saves malloc and copying overhead, thereby more than offsetting the
+       performance hit of the additional copying and NUL-termination in the
+       last patch to field.c. It also eliminates repeated parsing in cases
+       where $n, for n > 1, was accessed more than once in a numeric context,
+       so the new approach should be a performance win.
+2016-07-06         Andrew J. Schorr     <address@hidden>
        Make sure that all field values, and therefore all strings inside gawk,
        are terminated with a '\0' character!
        * field.c (databuf): New static struct to hold info about our buffer to
diff --git a/interpret.h b/interpret.h
index bbddd5a..106367f 100644
--- a/interpret.h
+++ b/interpret.h
@@ -363,12 +363,8 @@ uninitialized_scalar:
                        lhs = r_get_field(t1, (Func_ptr *) 0, true);
-                       /* only for $0, up ref count */
-                       if (*lhs == fields_arr[0]) {
-                               r = *lhs;
-                               UPREF(r);
-                       } else
-                               r = dupnode(*lhs);
+                       r = *lhs;
+                       UPREF(r);


Summary of changes:
 ChangeLog   |   10 ++++++++++
 interpret.h |    8 ++------
 2 files changed, 12 insertions(+), 6 deletions(-)


reply via email to

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