[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-hackers] [PATCH] improve performance of write-u8vector
From: |
Thomas Hintz |
Subject: |
[Chicken-hackers] [PATCH] improve performance of write-u8vector |
Date: |
Mon, 20 Oct 2014 17:21:34 -0700 |
Improves performance of write-u8vector by copying the vector in one
chunk instead of writing it out character by character. I added range
checks too which seems like the right thing to do and is required if
either "from" or "to" are specified since that uses subu8vector now
which will fail if "from" or "to" is out-of-range. (Letting just
subu8vector do the range checks gives misleading error messages even
though it is redundant.) However, this will cause old code that passed
in invalid values to trigger an error now instead of just writing
nothing as is the current behavior. I added tests for write-u8vector as
well.
16MB test case, new:
0.06s CPU time, 0.04s GC time (major), 25/2 mutations (total/tracked),
3/4 GCs (major/minor)
old (4.9.0.1):
0.63s CPU time, 0.01s GC time (major), 25 mutations, 3/4886 GCs
(major/minor)
Thanks and all the best,
Thomas Hintz
0001-Improving-performance-of-write-u8vector.patch
Description: Text Data
- [Chicken-hackers] [PATCH] improve performance of write-u8vector,
Thomas Hintz <=
- Re: [Chicken-hackers] [PATCH] improve performance of write-u8vector, Daniel Leslie, 2014/10/20
- Re: [Chicken-hackers] [PATCH] improve performance of write-u8vector, Thomas Hintz, 2014/10/20
- Re: [Chicken-hackers] [PATCH] improve performance of write-u8vector, Daniel Leslie, 2014/10/20
- Re: [Chicken-hackers] [PATCH] improve performance of write-u8vector, Thomas Hintz, 2014/10/21
- Re: [Chicken-hackers] [PATCH] improve performance of write-u8vector, Peter Bex, 2014/10/27
- Re: [Chicken-hackers] [PATCH] improve performance of write-u8vector, Evan Hanson, 2014/10/28
- Re: [Chicken-hackers] [PATCH] improve performance of write-u8vector, Alaric Snell-Pym, 2014/10/29