summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorDaniel Llorens <lloda@sarc.name>2019-12-18 14:31:39 +0100
committerDaniel Llorens <lloda@sarc.name>2020-01-03 13:01:04 +0100
commitddad8ae05adfdb84ef80cb2d2730e73f4d27c74b (patch)
treea0e6b848a8aa82edcb649f5291d6008f38f5dc68 /NEWS
parent6b0491233f6b7e3ca2743ec43340a2ed04ac845e (diff)
downloadguile-ddad8ae05adfdb84ef80cb2d2730e73f4d27c74b.tar.gz
Extend core vector-fill! to handle a range
With this patch, these two lines (vector-fill! vec fill) (vector-fill! vec fill 0 end) run at the same speed; before, the second one was much slower. This patch also makes it an error to call vector-fill! with a non-vector array. The previous implementation did not work correctly in this case. * libguile/vectors.c (SCM_VALIDATE_MUTABLE_VECTOR): Better error message. (vector-fill!): Handle optional arguments start, end. Do not attempt to handle non-vector arrays. Rename the C binding to scm_vector_fill_partial_x. (scm_vector_fill_x): Reuse scm_vector_fill_partial_x. * module/srfi/srfi-43.scm (vector-fill!): Remove & re-export the core version instead.
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS19
1 files changed, 19 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index b89813247..4fb91c879 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,25 @@ See the end for copying conditions.
Please send Guile bug reports to bug-guile@gnu.org.
+Changes since alpha 2.9.8:
+
+** Fix performance of SRFI-43 vector-fill!
+
+SRFI-43 vector-fill! now has the same performance whether an optional
+range is provided or not, and is also provided in core. As a side
+effect, vector-fill! and vector_fill_x no longer work on non-vector
+rank-1 arrays. Such cases were handled incorrectly before; for example,
+prior to this change,
+
+ (define a (make-vector 10 'x))
+ (define b (make-shared-array a (lambda (i) (list (* 2 i))) 5))
+ (vector-fill! b 'y)
+
+ => #1(y y y x x)
+
+This is now an error. Instead, use array-fill! (or array_fill_x).
+
+
Changes in alpha 2.9.8 (since alpha 2.9.7):
* Bug fixes