nushell/crates/nu-protocol/src/ast
Ian Manske 9a265847e2
Box ImportPattern in Expr (#12568)
# Description
Adds a `Box` around the `ImportPattern` in `Expr` which decreases the
size of `Expr` from 152 to 64 bytes (and `Expression` from 216 to 128
bytes). This seems to speed up parsing a little bit according to the
benchmarks (main is top, PR is bottom):
```
benchmarks                       fastest       │ slowest       │ median        │ mean          │ samples │ iters
benchmarks                       fastest       │ slowest       │ median        │ mean          │ samples │ iters
├─ parser_benchmarks                           │               │               │               │         │
├─ parser_benchmarks                           │               │               │               │         │
│  ├─ parse_default_config_file  2.287 ms      │ 4.532 ms      │ 2.311 ms      │ 2.437 ms      │ 100     │ 100
│  ├─ parse_default_config_file  2.255 ms      │ 2.781 ms      │ 2.281 ms      │ 2.312 ms      │ 100     │ 100
│  ╰─ parse_default_env_file     421.8 µs      │ 824.6 µs      │ 494.3 µs      │ 527.5 µs      │ 100     │ 100
│  ╰─ parse_default_env_file     402 µs        │ 486.6 µs      │ 414.8 µs      │ 416.2 µs      │ 100     │ 100

```
2024-04-18 17:57:01 +02:00
..
block.rs Rename IoStream to OutDest (#12433) 2024-04-09 16:48:32 +00:00
call.rs IO and redirection overhaul (#11934) 2024-03-14 15:51:55 -05:00
cell_path.rs Add into cell-path for dynamic cell-path creation (#11322) 2024-01-24 16:20:46 -06:00
expr.rs Box ImportPattern in Expr (#12568) 2024-04-18 17:57:01 +02:00
expression.rs Box ImportPattern in Expr (#12568) 2024-04-18 17:57:01 +02:00
import_pattern.rs Error on use path item1 item2, if item1 is not a module (#11183) 2023-12-05 11:38:45 +01:00
match_pattern.rs add match guards (#9621) 2023-07-16 12:25:12 +12:00
mod.rs Restructure nu-protocol in more meaningful units (#11917) 2024-03-10 18:45:45 +01:00
operator.rs Range refactor (#12405) 2024-04-06 09:04:56 -05:00
pipeline.rs Rename IoStream to OutDest (#12433) 2024-04-09 16:48:32 +00:00
unit.rs Follow API guidelines for public types (#12283) 2024-03-26 12:12:25 +01:00