Commit graph

13 commits

Author SHA1 Message Date
Fabian Homborg
1083cd2640 Benchmarks: Make seq_echo benchmark longer
This took ~12ms on my system, which is too short to see much more than
startup time.
2020-12-15 18:17:13 +01:00
Fabian Homborg
b4cf910e55 Add a benchmark for math
Results after 14908322a9, compared to 3.1.2:

math.fish
fish
  rusage self:
      user time: 916 ms
       sys time: 39 ms
     total time: 955 ms
        max rss: 35028 kb
        signals: 0
build/fish
  rusage self:
      user time: 769 ms
       sys time: 60 ms
     total time: 829 ms
        max rss: 34868 kb
        signals: 0
Benchmark #1: fish benchmarks/benchmarks/math.fish > /dev/null
  Time (mean ± σ):     955.2 ms ±  32.5 ms    [User: 897.2 ms, System: 57.9 ms]
  Range (min … max):   896.3 ms … 1002.5 ms    10 runs

Benchmark #2: build/fish benchmarks/benchmarks/math.fish > /dev/null
  Time (mean ± σ):     840.3 ms ±  21.5 ms    [User: 784.4 ms, System: 54.8 ms]
  Range (min … max):   802.4 ms … 869.0 ms    10 runs

Summary
  'build/fish benchmarks/benchmarks/math.fish > /dev/null' ran
    1.14 ± 0.05 times faster than 'fish benchmarks/benchmarks/math.fish > /dev/null'
2020-12-15 08:09:39 +01:00
Fabian Homborg
796d92b4e9 benchmark driver: Allow passing a second fish path to compare
[ci skip]
2020-09-21 20:58:39 +02:00
Fabian Homborg
9367d4ff71 Reindent functions to remove useless quotes
This does not include checks/function.fish because that currently
includes a "; end" in a message that indent would remove, breaking the test.
2020-03-09 19:46:43 +01:00
Fabian Homborg
115892ccd2 alias: Use read --tokenize
This did some weird unescaping to try to extract the first word.

So we're now more likely to be *correct*, and the alias benchmark is
about 20% *faster*.

Call it a win-win.
2019-12-01 18:14:26 +01:00
Rosen Penev
87e24db5ef driver.sh: Run through shellcheck 2019-11-28 20:26:01 +01:00
Fabian Homborg
9a3fb3e265 Use POSIX sh in the benchmark driver
There are reasons to use bash, `hash` is not one of them, as `command
-v` is perfectly capable and in POSIX.

[ci skip]
2019-11-27 16:21:11 +01:00
ridiculousfish
efe6fb3c3b Use hyperfine in the benchmark driver if available 2019-11-26 11:10:04 -08:00
ridiculousfish
03a289c9ef Add an aliases benchmark 2019-11-23 11:53:49 -08:00
Fabian Homborg
7ddae68645 Restyle a few stragglers
THERE WERE TABS! TABS!

TABS!

[ci skip]
2019-05-20 21:07:37 +02:00
David Adam
4d8a82b68f benchmarks: use true executable in path
true is /bin/true on some Linux and /usr/bin/true on macOS.

[ci skip]
2019-04-17 18:31:19 +08:00
ridiculousfish
e634abc1c8 Add a benchmark for external commands
This just runs '/usr/bin/true' a lot.
2019-04-13 12:40:09 -07:00
ridiculousfish
2d4872ba60 Add a benchmark driver and a simple benchmark
This adds a simple script that drives benchmarks, and a simple sample
benchmark.
2019-04-10 14:34:25 -07:00