From 48b14e1b23854fea4f523e8067bb07aa3d03c581 Mon Sep 17 00:00:00 2001 From: liuq19 Date: Mon, 3 Jun 2024 16:43:09 +0800 Subject: [PATCH] chore: force all optimize --- sonic.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sonic.go b/sonic.go index a92981c41..19a6ef912 100644 --- a/sonic.go +++ b/sonic.go @@ -26,10 +26,20 @@ import ( `github.com/bytedance/sonic/decoder` `github.com/bytedance/sonic/encoder` + enc `github.com/bytedance/sonic/internal/encoder` + `github.com/bytedance/sonic/internal/envs` + `github.com/bytedance/sonic/option` `github.com/bytedance/sonic/internal/rt` ) +func init() { + envs.EnableOptDec() + envs.EnableFastMap() + enc.ForceUseVM() + println("Warning: enable all optimize here, only used in test now") +} + type frozenConfig struct { Config encoderOpts encoder.Options