Commit Graph

12 Commits

Author SHA1 Message Date
Johannes Gräger
dec1aa2be3
feat: Go implementation for manifestYamlDoc and escapeStringJson (#742)
* Builtins for escapeStringJson and manifestYamlDoc

* Benchmark and tests
2024-06-09 19:27:15 +01:00
Jayme Bird
c7dc1bac16 feat: add benchmark data for builtin implementations 2022-10-25 16:22:34 +01:00
Jayme Bird
8abb4aa639 feat: implementation of manifestTomlEx in Go
Co-authored-by: Wojciech Kocjan <wojciech@kocjan.org>
2022-10-19 04:50:41 +01:00
Jesse-Cameron
953327b03c feat(test): add foldl benchmark test 2022-09-27 21:46:37 +01:00
Jayme Bird
6e180a9368 feat: add go implementation of std.parseInt 2022-09-04 15:59:03 +01:00
Stanisław Barzowski
fe28095772 Support for array comparison 2020-10-30 20:42:46 +01:00
Weston McNamee
3563a21847 perf(stdlib): ️ implement manifestJsonEx as native Go
❯ 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%
2020-06-13 19:53:42 +02:00
Stanisław Barzowski
9ada769ce4 Make golangci-lint happy
Some of the suggestions are minor bug fixes (missing error handling).
2020-03-05 14:54:27 +01:00
Wes McNamee
399a61ca31 feat: improve std.base64Decode performance 97%+ (#346)
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
2020-01-27 14:31:45 +01:00
Wes McNamee
e8bd3f4ff8 feat: improve stdlib base64 performance by 98.58%+
Implements std.base64 in native Go, improving performance

benchmark                                 old ns/op       new ns/op     delta
Benchmark_Builtin_base64-16               10805730974     23158636      -99.79%
Benchmark_Builtin_base64_bytearray-16     8682808704      123360964     -98.58%
2020-01-27 09:40:21 +01:00
Wes McNamee
3b580145f4 feat: improve std.reverse performance by 73.39%
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
2020-01-26 22:11:59 +01:00
Weston McNamee
27b4c60bc7 feat: Improve performance of substr by 84.44%
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
2020-01-26 09:20:58 +01:00