Download Latest Version nl.xz (152 Bytes)
Email in envelope

Get an email when there's a new version of kiekiam

Home / notes / misread / doc
Name Modified Size InfoDownloads / Week
Parent folder
sketch 2020-10-18 284 Bytes
readme 2020-10-18 2.5 kB
Totals: 2 Items   2.8 kB 0
doc/readme

  This file, captain Obivious.


bin/runme

  An attempt to proove zsh's read speed is ~200% bash's one
  whereas zsh's _sysread_ is only approximatively 90%;
  and furthermore, the latter shell does not trim its input.

  To be able to be launch, requires xz, wc, date,
  sed, paste, awk, rm, bash and of course zsh.

  It should output something like:

    $ ./bin/runme mp
    running 15 speed tests ...
    br1 zr1 zs1 br2 zr2 zs2 br3 zr3 zs3 br4 zr4 zs4 br5 zr5 zs5 

    bash read ...
    @ EOL: "^nothing$" "^some spaces$" "^some	tabs$"
    avg time: 2.0s user 0.93s system 99% cpu 2.908 total

    zsh read ...
    @ EOL: "^nothing$" "^some spaces$" "^some	tabs$"
    avg time: 3.9s user 7.03s system 99% cpu 10.934 total

    zsh sysread ...
    @ EOL: "^nothing$" "^ some spaces $" "^	some	tabs	$"
    avg time: 1.7s user 0.71s system 96% cpu 2.460 total


  With a lighter input, sysread demonstrates its superiority:

    $ ./bin/runme nl
    running 15 speed tests ...
    br1 zr1 zs1 br2 zr2 zs2 br3 zr3 zs3 br4 zr4 zs4 br5 zr5 zs5 

    bash read ...
    @ EOL: "^nothing$" "^some spaces$" "^some	tabs$"
    avg time: 1.5s user 0.87s system 99% cpu 2.327 total

    zsh read ...
    @ EOL: "^nothing$" "^some spaces$" "^some	tabs$"
    avg time: 1.3s user 1.08s system 99% cpu 2.374 total

    zsh sysread ...
    @ EOL: "^nothing$" "^ some spaces $" "^	some	tabs	$"
    avg time: 0.0s user 0.01s system 97% cpu 0.037 total


doc/sketch

  A poor textual representation of the running algorithm.


bin/read.bash

  A shell script adding a '+' mark at the beginning of lines.
  Gets inputs using shell's internal command (read).


bin/sysread.zsh

  Same thing, implemented using sysread from zsh.


lib/ifsateol

  3 lines with different $IFS characters at beginning and end of each one.
  No, we do not suffix text file names with .txt here ...


lib/mp.xz

  Marcel PROUST's novel 'À la recherche du temps perdu'.
  Guinness World Record holder for longest novel.
  (https://www.guinnessworldrecords.com/world-records/longest-novel)

  A xz-compressed iso-latin1 text file built from epubs found online.
  (http://www.bouquineux.com/index.php?ebooks=59&Proust)

  Shall still be public domain, even in countries with
  a '70 years after author's death' copyright law.
  (https://en.wikipedia.org/wiki/List_of_countries%27_copyright_lengths)

  Did not read it, just needed a pretty big text file ...


lib/nl.xz

  Once uncompressed, same Number of Lines as mp.xz,
  but only filled up with New Lines.
Source: readme, updated 2020-10-18