perf enhancement

This commit is contained in:
2025-11-16 16:21:35 +05:30
parent 29cddb6389
commit 1d9d9d9308
9 changed files with 917 additions and 35 deletions

View File

@@ -36,7 +36,7 @@ func TestInsertQuery2(t *testing.T) {
}
}
// BenchmarkInsertQuery-12 2014519 584.0 ns/op 1144 B/op 18 allocs/op
// BenchmarkInsertQuery-12 2517757 459.6 ns/op 1032 B/op 13 allocs/op
func BenchmarkInsertQuery(b *testing.B) {
for b.Loop() {
_ = db.User.Insert().
@@ -50,7 +50,7 @@ func BenchmarkInsertQuery(b *testing.B) {
}
}
// BenchmarkInsertSetMap-12 1534039 777.1 ns/op 1480 B/op 20 allocs/op
// BenchmarkInsertSetMap-12 1812555 644.1 ns/op 1368 B/op 15 allocs/op
func BenchmarkInsertSetMap(b *testing.B) {
for b.Loop() {
_ = db.User.Insert().

View File

@@ -43,7 +43,7 @@ func TestUpdateQueryValidation(t *testing.T) {
}
}
// BenchmarkUpdateQuery-12 2004985 592.2 ns/op 1176 B/op 20 allocs/op
// BenchmarkUpdateQuery-12 2334889 503.6 ns/op 1112 B/op 17 allocs/op
func BenchmarkUpdateQuery(b *testing.B) {
for b.Loop() {
_ = db.User.Update().