❯ make benchmark FILTER=Builtin_manifestJsonEx
go build ./cmd/jsonnet
./benchmark.sh Builtin_manifestJsonEx
Running Before Test... (10s)
Running After Test... (10s)
benchmark old ns/op new ns/op delta
Benchmark_Builtin_manifestJsonEx-16 22656394 7502016 -66.89%
TestSdumpLargeDefinition is depnding on a global state change in
TestSdumpReusedPointers. It can't pass if it runs in the wrong order.
Fixes internal auto-filled bug.
Exposes what I consider a good public API from the `internal/formatter`
package.
Having a go-native formatter is an awesome thing, especially because it
allows shipping the formatter as part of other projects. It's also fair
to keep the formatter's code in `internal`, yet third party projects
should have a way to use relevant parts of it.
* Extract some test utilities to a separate package.
* Rename some test utilities.
* Internally expose DirectChildren.
* Add LocationRange to some non-expr AST parts,
such as local binds, parameters and object fields.
* Add end-of-file-reached testcases.
feat: improve std.base64Decode performance 97%+
Provides a Go-native implementation of std.base64Decode and std.base64DecodeBytes
benchmark old ns/op new ns/op delta
Benchmark_Builtin_base64Decode-16 10946388307 25004135 -99.77%
Benchmark_Builtin_base64DecodeBytes-16 6420742757 181513016 -97.17%
related to #111
Implements std.reverse in native Go, improving performance
benchmark old ns/op new ns/op delta
Benchmark_Builtin_reverse-16 869191619 231309458 -73.39%
part of #111
This pulls in the implementation of substr into native Go instead of interpretted Jsonnet.
benchmark old ns/op new ns/op delta
Benchmark_Builtin_substr-16 97121527 15115905 -84.44%
part of #111
When adding long strings, don't copy them immediately. Instead
build long strings only when their contents are requested.
This allows to build a long string from parts, using a regular
operator+ in linear time. This lets users to worry much less
about using std.join etc.
If indexing the string is mixed with building it using operator+
the behavior can still be quadratic. We may want to address it in
a later change.