2025-04-23 12:37:13: merge [master:25903033b36f30bc00c0a2553a3ae9071e98f9c6];

This commit is contained in:
txix committed 2025-04-23 12:37:13 +03:00
1 parent ad505b8f3c
commit e701501dbb
8 files changed
+132 -180

No files matched your search

+5 -4
View File
@@ -2,10 +2,11 @@
package tests_test
import (
json2 "github.com/txix-open/isp-kit/json"
"strings"
"testing"
json2 "github.com/txix-open/isp-kit/json"
"github.com/dop251/goja"
"github.com/robertkrimen/otto"
"github.com/robertkrimen/otto/parser"
@@ -147,7 +148,7 @@ func BenchmarkOtto(b *testing.B) {
return
}
for i := 0; i < b.N; i++ {
for range b.N {
runTime := otto.New()
err = runTime.Set("b", recordsExample)
if err != nil {
@@ -173,7 +174,7 @@ func BenchmarkOtto(b *testing.B) {
func BenchmarkGoja(b *testing.B) {
prog := goja.MustCompile("test.js", jsScript, false)
for i := 0; i < b.N; i++ {
for range b.N {
runTime := goja.New()
err := runTime.Set("b", recordsExample)
if err != nil {
@@ -200,7 +201,7 @@ func BenchmarkGopherLua(b *testing.B) {
panic(err)
}
for i := 0; i < b.N; i++ {
for range b.N {
l := lua.NewState()
val, err := json.Decode(l, srcString)