Commit Graph

14 Commits

Author SHA1 Message Date
Fabian Boehm
ae24d98356 benchmarks: Run glob only once
We assume that you use something like hyperfine to run warmups, like
our driver script does.

This allows the script to be run e.g. in valgrind without being too
much of a pain in the gluteus.
2024-01-07 19:33:15 +01:00
Fabian Boehm
a913702b63 Add more benchmarks 2023-06-01 18:15:42 +02:00
Fabian Boehm
f4797a0133 benchmarks: Use --no-config
It's existed since 3.3.0, so now seems to be an acceptable time to add
it.

(also adjust some repetitions a bit so they don't take too long)
2022-09-24 13:36:24 +02:00
Ilan Cosman
566a673e4f Run fish_indent on all non-test .fish files 2021-11-23 09:49:45 +01:00
Fabian Homborg
c444ee2e6a benchmarks: Add globbing 2021-10-25 18:42:18 +02:00
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
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
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