nushell/crates/nu-cli/src
Stefan Holderbach ba6f38510c
Shrink Value by boxing Range/Closure (#12784)
# Description
On 64-bit platforms the current size of `Value` is 56 bytes. The
limiting variants were `Closure` and `Range`. Boxing the two reduces the
size of Value to 48 bytes. This is the minimal size possible with our
current 16-byte `Span` and any 24-byte `Vec` container which we use in
several variants. (Note the extra full 8-bytes necessary for the
discriminant or other smaller values due to the 8-byte alignment of
`usize`)

This is leads to a size reduction of ~15% for `Value` and should overall
be beneficial as both `Range` and `Closure` are rarely used compared to
the primitive types or even our general container types.

# User-Facing Changes
Less memory used, potential runtime benefits.

(Too late in the evening to run the benchmarks myself right now)
2024-05-09 08:10:58 +08:00
..
commands ListStream touchup (#12524) 2024-05-05 16:00:59 +00:00
completions fix: prevent relative directory traversal from crashing (#12438) 2024-05-03 20:17:50 -05:00
menus Rename IoStream to OutDest (#12433) 2024-04-09 16:48:32 +00:00
config_files.rs Migrate to a new PWD API (part 2) (#12749) 2024-05-07 18:17:49 +03:00
eval_cmds.rs Add --no-newline option to nu (#12410) 2024-04-09 10:04:00 -04:00
eval_file.rs Migrate to a new PWD API (part 2) (#12749) 2024-05-07 18:17:49 +03:00
lib.rs Overhaul the plugin cache file with a new msgpack+brotli format (#12579) 2024-04-21 07:36:26 -05:00
nu_highlight.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
print.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
prompt_update.rs Shrink Value by boxing Range/Closure (#12784) 2024-05-09 08:10:58 +08:00
prompt.rs cleanup osc calls for shell_integration (#12810) 2024-05-08 13:34:04 -05:00
reedline_config.rs Remove some macros (#12742) 2024-05-03 10:35:37 +02:00
repl.rs cleanup osc calls for shell_integration (#12810) 2024-05-08 13:34:04 -05:00
syntax_highlight.rs Avoid taking unnecessary ownership of intermediates (#12740) 2024-05-04 00:53:15 +00:00
util.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
validation.rs Remove old alias implementation (#8797) 2023-04-07 21:09:38 +03:00