Replies: 3 comments 3 replies
-
Does PHP have same query/sec? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Yes. PHP 7.4.15
Perl (v5.36.0)
Go 1.21.6
test.php
test.pl
|
Beta Was this translation helpful? Give feedback.
0 replies
-
But I don't want to argue about whether PHP or Perl performed better in this task. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have written a test script
m2
that simply executes db.Exec("UPDATE user SET count=count+ 1 WHERE id = '1'") in a loop, and I observe a CPU load of up to 25%. The same operation in Perl results in a CPU load of up to 11%, while in PHP, it reaches up to 9%.perf report readings on the screenshot
perf record -g -a sleep 25
perf report
I want to understand for myself who is to blame, whether it's the Go architecture or go-sql-driver. Or maybe there are optimization solutions. Google search didn't help me. So, I decided to ask here.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions