![]() ![]() Range (min … max): 0.7 ms … 1.7 ms 3849 runsīenchmark 4: /home/reilly/bin/nu -c "echo \"Hello, world!\"" ![]() Range (min … max): 0.4 ms … 1.7 ms 4436 runsīenchmark 3: zsh -c "echo \"Hello, world!\"" It might help to use the '-warmup' or '-prepare' options.īenchmark 2: bash -c "echo \"Hello, world!\"" Consider re-running this benchmark on a quiet PC without any interferences from other programs. Warning: Statistical outliers were detected. 〉hyperfine -L shell sh,bash,zsh,/home/reilly/bin/nu ' -c "echo \"Hello, world!\""' -shell=none -warmup=10īenchmark 1: sh -c "echo \"Hello, world!\"" At the point where a `LazyRecord` normally would get serialized and sent to a plugin, I instead collect it into a regular `Value::Record` (which can be serialized) Any unserializable fields in `LazyRecord` implementations get marked with `#`ģ. Add `#` to `LazyRecord` to make it serializableĢ. ![]() To work around this, I basically lie to the type system:ġ. `Value` variants must implement `Serializable` and `Deserializable`, which poses some problems because I want to use unserializable things like `EngineState` in `LazyRecord`s. Implementations must implement these 2 functions:įn get_column_value(&self, column: &str) -> Result ![]() Those trait objects, much like `CustomValue`. I've added a new `LazyRecord` trait and added a `Value` variant wrapping `proptest` tests disabled) goes from **7.2s to 4.4s (1.6x faster)**,īecause most tests involve launching a new instance of Nu. Tests are also much faster! Running `cargo nextest` (with our very slow Hyperfine 'target/release/nu -c "echo \"Hello, world!\""' -shell=none Nu's time to start up and run a command (`cargo build -release I ran some benchmarks on my desktop (Linux, 12900K) and the results are Relatively slow because of all the information in `scope`, and [`$nu`Īccounts for about 2/3 of Nu's startup time on `LazyRecord` for the special `$nu` variable accessing `$nu` is Individual columns without evaluating other columns. `LazyRecord` is like a regular `Record`, but it's possible to access This is an attempt to implement a new `Value::LazyRecord` variant for
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |