Fabian Boehm
7bc4c9674b
builtins: Reduce streams.out.append/push_back calls
...
This basically immediately issues a "write()" if it's to a pipe or the
terminal.
That means we can reduce syscalls and improve performance, even by
doing something like
```c++
streams.out.append(somewcstring + L"\n");
```
instead of
```c++
streams.out.append(somewcstring);
streams.out.push_back(L'\n');
```
Some benchmarks of the
```fish
for i in (string repeat -n 2000 \n)
$thing
end
```
variety:
1. `set` (printing variables) sped up 1.75x
2. `builtin -n` 1.60x
3. `jobs` 1.25x (with 3 jobs)
4. `functions` 1.20x
5. `math 1 + 1` 1.1x
6. `pwd` 1.1x
Piping yields similar results, there is no real difference when
outputting to a command substitution.
2022-09-22 22:41:35 +02:00
..
2022-09-22 22:41:35 +02:00
2022-02-14 22:19:28 +01:00
2022-08-21 15:02:19 -07:00
2022-08-20 23:55:18 -07:00
2022-09-20 11:58:37 -07:00
2022-08-20 23:55:18 -07:00
2022-09-20 11:58:37 -07:00
2022-08-20 23:55:18 -07:00
2022-08-27 11:41:29 +02:00
2022-08-21 15:02:19 -07:00
2022-09-20 11:58:37 -07:00
2022-09-20 11:58:37 -07:00
2022-09-20 22:37:17 -05:00
2022-09-20 11:58:37 -07:00
2021-10-01 03:39:43 -07:00
2022-08-20 23:55:18 -07:00
2022-08-27 20:33:39 +02:00
2022-08-22 14:11:52 -07:00
2022-09-20 11:58:37 -07:00
2022-08-20 23:55:18 -07:00
2022-09-20 11:58:37 -07:00
2022-08-22 14:11:52 -07:00
2022-08-20 23:55:18 -07:00
2022-09-20 11:58:37 -07:00
2022-08-22 14:11:52 -07:00
2022-08-20 23:55:18 -07:00
2022-09-20 11:58:37 -07:00
2022-09-20 11:58:37 -07:00
2022-09-13 06:56:52 -07:00
2022-09-12 18:34:19 -07:00
2022-09-20 11:58:37 -07:00
2022-08-20 23:55:18 -07:00
2022-09-20 11:58:37 -07:00
2022-08-21 15:02:19 -07:00
2022-09-20 11:58:37 -07:00
2022-08-20 23:55:18 -07:00
2022-09-16 18:53:05 -05:00
2022-09-20 11:58:37 -07:00
2021-09-21 18:33:14 -07:00
2022-08-20 23:55:18 -07:00
2022-08-21 15:02:19 -07:00
2022-08-20 23:55:18 -07:00
2022-08-21 15:02:19 -07:00
2022-08-20 23:55:18 -07:00
2022-08-20 23:55:18 -07:00
2022-08-20 23:55:18 -07:00
2022-08-20 23:55:18 -07:00
2022-09-20 11:58:37 -07:00
2022-08-20 23:55:18 -07:00
2022-08-21 15:02:19 -07:00
2022-08-21 15:02:19 -07:00
2022-09-20 11:58:37 -07:00
2022-08-20 23:55:18 -07:00
2022-09-20 11:58:37 -07:00
2022-08-20 23:55:18 -07:00
2022-09-20 11:58:37 -07:00
2022-09-20 11:58:37 -07:00
2022-09-20 11:58:37 -07:00
2022-08-20 23:55:18 -07:00
2022-09-20 11:58:37 -07:00
2022-08-20 23:55:18 -07:00
2022-08-21 15:02:19 -07:00
2022-08-21 15:02:19 -07:00
2022-08-20 23:55:18 -07:00
2021-04-21 16:39:29 -07:00
2022-06-19 15:15:17 -07:00
2021-08-17 18:57:16 -05:00
2021-03-28 15:31:25 -07:00
2022-08-20 23:55:18 -07:00
2022-08-21 15:02:19 -07:00
2022-08-20 23:55:18 -07:00
2022-08-20 23:55:18 -07:00
2022-08-20 23:55:18 -07:00
2022-09-20 11:58:37 -07:00
2022-09-20 11:58:37 -07:00
2022-09-20 11:58:37 -07:00
2022-09-14 18:01:01 +02:00
2022-08-21 15:02:19 -07:00
2022-08-21 15:02:19 -07:00
2022-08-20 23:55:18 -07:00
2022-09-20 11:58:37 -07:00
2022-08-21 15:02:19 -07:00
2022-08-20 23:55:18 -07:00
2022-04-09 10:10:44 -07:00
2022-08-21 15:02:19 -07:00
2022-08-20 23:55:18 -07:00
2022-09-14 18:18:08 +02:00
2022-08-20 23:55:18 -07:00
2022-08-20 23:55:18 -07:00
2022-08-20 23:55:18 -07:00
2022-09-20 11:58:37 -07:00
2022-08-21 15:02:19 -07:00
2022-08-20 23:55:18 -07:00
2022-08-21 15:02:19 -07:00
2022-09-20 14:41:22 -07:00
2022-09-20 11:58:37 -07:00
2022-09-16 19:21:21 -05:00
2022-08-21 15:02:19 -07:00
2022-08-20 23:55:18 -07:00
2022-09-20 11:58:37 -07:00
2022-08-20 23:55:18 -07:00
2022-08-20 23:55:18 -07:00
2021-11-08 12:21:11 -08:00
2022-08-21 15:02:19 -07:00
2022-08-21 15:02:19 -07:00
2022-08-30 23:56:33 -07:00
2022-08-20 23:55:18 -07:00
2022-09-20 14:41:22 -07:00
2022-09-09 18:52:45 +02:00
2022-08-21 15:02:19 -07:00
2022-09-20 11:58:37 -07:00
2022-08-20 23:55:18 -07:00
2022-08-21 15:02:19 -07:00
2022-08-21 15:02:19 -07:00
2022-08-20 23:55:18 -07:00
2022-09-20 11:58:37 -07:00
2022-09-20 11:58:37 -07:00
2022-08-20 23:55:18 -07:00
2022-08-21 15:02:19 -07:00
2022-08-20 23:55:18 -07:00
2022-08-21 15:02:19 -07:00
2022-08-20 23:55:18 -07:00
2022-08-21 15:02:19 -07:00
2022-08-20 23:55:18 -07:00
2022-09-21 19:49:17 +02:00
2022-08-20 23:55:18 -07:00
2022-09-21 19:49:17 +02:00
2022-09-22 14:00:58 -05:00