Arrays performance comparison pasted by DeeEff on Tue Oct 10 21:40:00 2017

$ csi

CHICKEN
(c) 2008-2015, The CHICKEN Team
(c) 2000-2007, Felix L. Winkelmann
Version 4.10.0 (rev b259631)
windows-cygwin-x86-64 [ 64bit dload ptables ]
compiled 2015-08-04 on yves.more-magic.net (Linux)

readline: rl_catch_signals: unknown variable name
#;1> (use generalized-arrays storage-classes)
#;2> (define vv (make-array vector-storage-class #(1000 1000) "1"))
#;3> (time (array-map vector-storage-class (cute string-append "file" <> ".txt") vv))
2.464s CPU time, 1.356s GC time (major), 4046833/1011541 mutations (total/tracked), 15/7823 GCs (major/minor)
#<array>

python arrays performance comparison pasted by DeeEff on Tue Oct 10 21:40:41 2017

$ ipython
c:\python34\lib\site-packages\win_unicode_console\__init__.py:31: RuntimeWarning: sys.stdin.encoding == 'cp65001', whereas sys.stdout.encoding == 'utf-8', readline hook consumer may assume they are the same
  readline_hook.enable(use_pyreadline=use_pyreadline)
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 5.0.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import numpy as np

In [2]: vv = np.ones((1000, 1000), dtype=str)

In [3]: @np.vectorize
   ...: def append(*args):
   ...:     return ''.join(args)
   ...:

In [4]: %timeit append("file", vv, ".txt")
1 loop, best of 3: 835 ms per loop

In [5]:

chicken arrays utf8 performance comparison added by DeeEff on Tue Oct 10 21:43:48 2017

#;6> (use utf8)
#;7> (define vv (make-array vector-storage-class #(1000 1000) "1"))
#;8> (time (array-map vector-storage-class (cute string-append "file" <> ".txt") vv))
1.107s CPU time, 0.156s GC time (major), 4046851/1011534 mutations (total/tracked), 1/7837 GCs (major/minor)
#<array>
#;9>