nushell/crates/nu-cmd-lang/src/core_commands
Filip Andersson 2fd4a36c0d
Changes global allocator to mimalloc, improving performance. (#9415)
# Description
<!--
Thank you for improving Nushell. Please, check our [contributing
guide](../CONTRIBUTING.md) and talk to the core team before making major
changes.

Description of your pull request goes here. **Provide examples and/or
screenshots** if your changes affect the user experience.
-->

this PR makes nushell use mimalloc as the default allocator, this has
the benefit of reducing startup time on my machine. `17%` on linux and
`22%` on windows, when testing using hyperfine.
the overhead to compile seem to be quite small, aswell as the increase
of binary size quite small
on linux the binary went from `33.1mb` to `33.2mb`

linux

![image](https://github.com/nushell/nushell/assets/17986183/ba5379b4-2c08-483a-a9ff-a9d8524d2943)

windows 

![image](https://github.com/nushell/nushell/assets/17986183/fda5090f-96a9-48d1-ada4-617694b9d880)


# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->

# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect -A clippy::result_large_err` to check that
you're using the standard code style
- `cargo test --workspace` to check that all tests pass
- `cargo run -- crates/nu-std/tests/run.nu` to run the tests for the
standard library

> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->

# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2023-06-14 17:27:12 -05:00
..
overlay Add $env.CURRENT_FILE variable (#8861) 2023-04-13 23:33:29 +03:00
alias.rs Uniformize usage() and extra_usage() message ending for commands helper. (#8268) 2023-02-28 21:33:02 -08:00
break_.rs Remove parser keywords label from commands that do not need it (#8780) 2023-04-07 01:12:21 +03:00
collect.rs Move variables to var stack (#8604) 2023-03-25 12:56:45 +13:00
const_.rs Switch let/let-env family to init with math expressions (#8545) 2023-03-23 09:14:10 +13:00
continue_.rs Remove parser keywords label from commands that do not need it (#8780) 2023-04-07 01:12:21 +03:00
def_env.rs Uniformize usage() and extra_usage() message ending for commands helper. (#8268) 2023-02-28 21:33:02 -08:00
def.rs Uniformize usage() and extra_usage() message ending for commands helper. (#8268) 2023-02-28 21:33:02 -08:00
describe.rs Cratification: Break out nu_cmd_lang into a separate crate (#8181) 2023-02-24 09:54:42 -06:00
do_.rs Restrict closure expression to be something like {|| ...} (#8290) 2023-03-17 07:36:28 -05:00
echo.rs Cratification: Break out nu_cmd_lang into a separate crate (#8181) 2023-02-24 09:54:42 -06:00
error_make.rs allow records to have type annotations (#8914) 2023-04-26 08:16:55 -05:00
export_alias.rs Uniformize usage() and extra_usage() message ending for commands helper. (#8268) 2023-02-28 21:33:02 -08:00
export_def_env.rs Uniformize usage() and extra_usage() message ending for commands helper. (#8268) 2023-02-28 21:33:02 -08:00
export_def.rs Uniformize usage() and extra_usage() message ending for commands helper. (#8268) 2023-02-28 21:33:02 -08:00
export_extern.rs Uniformize usage() and extra_usage() message ending for commands helper. (#8268) 2023-02-28 21:33:02 -08:00
export_module.rs Allow creating modules from directories (#9066) 2023-05-06 21:39:54 +03:00
export_use.rs Uniformize usage() and extra_usage() message ending for commands helper. (#8268) 2023-02-28 21:33:02 -08:00
export.rs Cratification: Break out nu_cmd_lang into a separate crate (#8181) 2023-02-24 09:54:42 -06:00
extern_.rs Add extern def which allows raw arguments (#8956) 2023-04-28 09:06:43 +02:00
for_.rs Remove autoprinting of for loop (#8843) 2023-04-11 05:23:22 +12:00
hide_env.rs Document and critically review ShellError variants - Ep. 3 (#8340) 2023-03-06 18:33:09 +01:00
hide.rs Uniformize usage() and extra_usage() message ending for commands helper. (#8268) 2023-02-28 21:33:02 -08:00
if_.rs Remove parser keywords label from commands that do not need it (#8780) 2023-04-07 01:12:21 +03:00
ignore.rs Uniformize usage() and extra_usage() message ending for commands helper. (#8268) 2023-02-28 21:33:02 -08:00
lazy_make.rs Feature: Userland LazyRecords (#8332) 2023-05-17 18:35:22 -05:00
let_.rs Switch let/let-env family to init with math expressions (#8545) 2023-03-23 09:14:10 +13:00
loop_.rs Remove parser keywords label from commands that do not need it (#8780) 2023-04-07 01:12:21 +03:00
match_.rs Remove parser keywords label from commands that do not need it (#8780) 2023-04-07 01:12:21 +03:00
mod.rs Break up interdependencies of command crates (#9429) 2023-06-14 23:12:55 +02:00
module.rs Allow creating modules from directories (#9066) 2023-05-06 21:39:54 +03:00
mut_.rs Switch let/let-env family to init with math expressions (#8545) 2023-03-23 09:14:10 +13:00
register.rs Clarify how register works (#8583) 2023-03-23 13:02:22 -05:00
return_.rs Uniformize usage() and extra_usage() message ending for commands helper. (#8268) 2023-02-28 21:33:02 -08:00
try_.rs Remove parser keywords label from commands that do not need it (#8780) 2023-04-07 01:12:21 +03:00
use_.rs Allow creating modules from directories (#9066) 2023-05-06 21:39:54 +03:00
version.rs Changes global allocator to mimalloc, improving performance. (#9415) 2023-06-14 17:27:12 -05:00
while_.rs Remove parser keywords label from commands that do not need it (#8780) 2023-04-07 01:12:21 +03:00