Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use #![no_std] in test crates to speed up tests. #1171

Merged
merged 3 commits into from
Mar 7, 2025

Conversation

obi1kenobi
Copy link
Owner

The difference is significant.

In the original code:

generate rustdoc JSON:
real    2m45.816s
user    1m54.422s
sys     0m26.240s

cargo test:
real    2m4.599s
user    23m2.108s
sys     0m27.490s

84MB in localdata/test_data

With #![no_std] where easily feasible:

generate rustdoc JSON:
real    1m45.892s
user    1m8.053s
sys     0m15.327s

cargo test:
real    1m49.396s
user    23m3.742s
sys     0m19.184s

41MB in localdata/test_data

The difference is significant.

In the original code:
```
generate rustdoc JSON:
real    2m45.816s
user    1m54.422s
sys     0m26.240s

cargo test:
real    2m4.599s
user    23m2.108s
sys     0m27.490s

84MB in localdata/test_data
```

With `#![no_std]` where easily feasible:
```
generate rustdoc JSON:
real    1m45.892s
user    1m8.053s
sys     0m15.327s

cargo test:
real    1m49.396s
user    23m3.742s
sys     0m19.184s

41MB in localdata/test_data
```
@obi1kenobi obi1kenobi merged commit 4246efa into main Mar 7, 2025
32 of 33 checks passed
@obi1kenobi obi1kenobi deleted the use_no_std_in_test_crates branch March 7, 2025 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant