-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Decode needs to check if CUE values are null, but isn't interested in the constructed error value if they are not. That work is wasted, so add a method that returns a bool and avoids it. This noticeably affects internal/filetypes: │ old │ new │ │ sec/op │ sec/op vs base │ CueFmtAll 268.7m ± 3% 230.5m ± 0% -14.20% (p=0.000 n=10) │ old │ new │ │ user-sec/op │ user-sec/op vs base │ CueFmtAll 437.0m ± 7% 391.9m ± 7% -10.31% (p=0.000 n=10) Signed-off-by: Daniel Martí <mvdan@mvdan.cc> Change-Id: I33d6327f26e7cabb878c0c444f34cc9bde4deb03 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1193405 Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Roger Peppe <rogpeppe@gmail.com>
- Loading branch information
Showing
3 changed files
with
39 additions
and
7 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
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
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