-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
below: procfs: Reinterpret internal buffer as &str without realloc
Summary: Almost all files go through this path, so a little gain here goes a long way. In terms of safety, none of the files we read using read_file_to_string from should have invalid UTF-8. The two that can (cmdline/exe) already have special handling outside of this. This saves about 1-2% of CPU per iteration. Reviewed By: dschatzberg Differential Revision: D58083974 fbshipit-source-id: 9a4fc1a7c0bd7b7bdfb442ef33cfefd21ed4c49d
- Loading branch information
1 parent
f02f629
commit 74728f4
Showing
1 changed file
with
16 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters