0.7.0
Added
- Inline comments support in binary operators:
- ++ - # subsections go last + ++ # subsections go last
- Inline comments support in
with
andassert
expressions:- assert (libXft != null) -> libpng != null; - # probably a bug - assert stdenv.isDarwin -> libXaw != null; - # fails to link otherwise + assert (libXft != null) -> libpng != null; # probably a bug + + assert stdenv.isDarwin -> libXaw != null; # fails to link otherwise +
- Inline comments support for
if-then-else
expressions:if y ? ${a} - then v x.${a} y.${a} - # both have attr, use merge func - else x.${a} - # only x has attr + then v x.${a} y.${a} # both have attr, use merge func + else x.${a} # only x has attr
- Inline comments support for
inherit
expressions:inherit (callPackage ../development/tools/ocaml/ocamlformat {}) - ocamlformat - # latest version + ocamlformat # latest version ocamlformat_0_11_0
- Inline comments support for
parenthesis
expressions:- || ( - # Accept {} for tests that are unsupported + || ( # Accept {} for tests that are unsupported isDerivation x && x ? meta.timeout );
Changed
-
Linux binaries now use mimalloc
to provide much better performance when formatting Nixpkgs:-
x86_64-unknown-linux-gnu, 1.3x faster,
from 0m10.639s to 0m8.381s -
x86_64-unknown-linux-musl, 15.8x faster,
from 2m32.686s to 0m9.642s -
On QEMU aarch64-unknown-linux-musl,
4.6x faster,
from 5m26s to 1m10s -
On QEMU armv6l-unknown-linux-musleabihf,
1.05x faster,
from 8m7s to 7m41s -
On QEMU armv7l-unknown-linux-musleabihf,
1.15x faster,
from 5m54s to 5m7s -
On QEMU i686-unknown-linux-musl,
1.07x faster,
from 2m44s to 2m33s
-
-
After profiling the code as suggested by
nnethercote's perf-book
one critical path of Alejandra was identified an optimized,
yielding huge performance boosts:-
x86_64-unknown-linux-gnu, 2.5x faster,
from 0m8.381s to 0m3.410s -
x86_64-unknown-linux-musl, 2.3x faster,
from 0m9.642s to 0m4.134s -
On QEMU aarch64-unknown-linux-musl,
2.4x faster,
from 1m10s to 0m29s -
On QEMU armv6l-unknown-linux-musleabihf,
1.85x faster,
from 7m41s to 4m8.399s -
On QEMU armv7l-unknown-linux-musleabihf,
1.88x faster,
from 5m7s to 2m42.595s -
On QEMU i686-unknown-linux-musl,
1.65x faster,
from 2m33s to 1m32.671s
In general this is an algorithmic improvement
and therefore the following platforms should be faster as well
by a similar ratio
(not measured):- aarch64-apple-darwin
- x86_64-apple-darwin
-
-
A
--threads
flag, so you can pick how many formatting threads to spawn.
Defaults to the number of logical CPUs in your system. -
Position counters were improved to offer an extra 1.13x speedup.
What's Changed
- refactor: remove unnecessary code by @kamadorueda in #204
- refactor: simplify code by @kamadorueda in #205
- refactor: mark as pub(crate) by @kamadorueda in #206
- refactor: remove unnecessary code by @kamadorueda in #207
- perf: use mimalloc by @kamadorueda in #208
- docs: simplify installation by @kamadorueda in #209
- docs: add nixpkgs installation method by @kamadorueda in #210
- perf: lazy position by @kamadorueda in #211
- feat: --threads flag by @kamadorueda in #213
- refactor: split apply by @kamadorueda in #214
- refactor: split assert or with by @kamadorueda in #215
- refactor: apply by @kamadorueda in #216
- refactor: if else by @kamadorueda in #217
- perf: O(n) update of position by @kamadorueda in #218
- refactor: solve clippy warnings by @kamadorueda in #219
- refactor: bin-op by @kamadorueda in #220
- feat: support more inline comments by @kamadorueda in #223
- feat: support more inline comments by @kamadorueda in #224
- feat: support inline comments in if-else by @kamadorueda in #225
- feat: inline comments on inherit by @kamadorueda in #226
- feat: support inline comments on parens by @kamadorueda in #227
- feat: simplify parens by @kamadorueda in #228
- feat: simplify parens by @kamadorueda in #229
Full Changelog: 0.6.0...0.7.0