Skip to content

Commit

Permalink
main: export LC_ALL=C
Browse files Browse the repository at this point in the history
We can get a small speed boost by using the C locale since we are
handling ASCII only anyway.

This saves between 1 and 3 million cycles in my `perf stat` tests
out of 16 to 36 million cycles.

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
  • Loading branch information
simondeziel committed May 8, 2022
1 parent 3213a90 commit f3ea7e5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions distrobuilder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,9 @@ func addSystemdGenerator() {
# NOTE: systemctl is not available for systemd-generators
set -eu
# disable localisation (faster grep)
export LC_ALL=C
## Helper functions
# is_lxc_container succeeds if we're running inside a LXC container
is_lxc_container() {
Expand Down

0 comments on commit f3ea7e5

Please sign in to comment.