Post AXGRePcJ33HCBt5mSG by ccqpein@mas.to
(DIR) More posts by ccqpein@mas.to
(DIR) Post #AXGOeCZdF6IfsM37wG by louis@emacs.ch
2023-07-01T21:53:33Z
0 likes, 0 repeats
Setup a simple HTTP server from stdlibs that responds with a simple "Hello, World" string, no logging.10s load test run on MacBook Pro M1 (using hey).LispWorks 8 (Hunchentoot): ~11k req/secRacket 8.9: ~15k req/secSBCL 2.3.4 (Hunchentoot): ~44k req/secGo 1.20: ~120k req/sec#LispWorks #SBCL #CommonLisp #Racket #Golang
(DIR) Post #AXGPfm1Z1XJg4EQa7k by galdor@emacs.ch
2023-07-01T22:05:03Z
0 likes, 0 repeats
@louis seems about right, unfortunately. Thanks for the numbers!
(DIR) Post #AXGRePcJ33HCBt5mSG by ccqpein@mas.to
2023-07-01T22:27:13Z
0 likes, 0 repeats
@louis nice testing. I always wondered if someone done this tests before.
(DIR) Post #AXGRtVMNyehELYqHaa by sirber@fosstodon.org
2023-07-01T22:30:00Z
0 likes, 0 repeats
@louis I wonder how #nodejs or #deno would perform
(DIR) Post #AXH6MhVbsr2waddKUq by orsinium@fosstodon.org
2023-07-02T06:03:28Z
0 likes, 0 repeats
@louis I learned Go while waiting for DrRacket to boot.
(DIR) Post #AXHQZ6wL9h6a1OKb2m by not_null_p@emacs.ch
2023-07-02T09:49:49Z
0 likes, 0 repeats
@louis Thanks for the benchmark. Also, at least it's good to see that the good old, reliable #hunchentoot is the fastest among the #lisp variants here.
(DIR) Post #AXHUhnMphA7Jjz7Skq by djrmarques@emacs.ch
2023-07-02T10:36:12Z
0 likes, 0 repeats
@louis Pretty cool. Noob question: Any reason on why LispWorks runs much slower than SBCL? Aren't they supposed to be implementations of the same language, but LispWorks is proprietary? Also, is the Common Lisp code compiled?
(DIR) Post #AXHVp4LF5DrIMoPL4S by glitzersachen@hachyderm.io
2023-07-02T10:48:43Z
0 likes, 0 repeats
@louis Do you have any insight on whether the processes are cpu or i/o bound? Is the load more maxed out to 1 or visibly below it? (assuming they only use one thread)
(DIR) Post #AXHWs3nvdZlZWVodeK by forthy42@mastodon.net2o.de
2023-07-02T11:00:26Z
0 likes, 0 repeats
@louis Do you keep the connection alive or do you close them per request?
(DIR) Post #AXHXFGiLnvKiDvH0Eq by cel7t@emacs.ch
2023-07-02T11:04:39Z
0 likes, 0 repeats
@louis try the Woo web server (CL) as well, it is almost as fast as Go and in some cases faster.
(DIR) Post #AXHa5r9rkgS8DcLZ5c by louis@emacs.ch
2023-07-02T11:36:33Z
0 likes, 0 repeats
@cel7t SBCL 2.3.4 with Woo: ~60k req/sec.Not too bad but I would neither use nor recommend fukamachis libraries. They are badly documented, if at all. For Woo, I had to check the source code to find out what port it was running or how to set it.Btw. Woo did not compile with LispWorks, CLISP or ECL.
(DIR) Post #AXHaTc1ze4O0FkzZp2 by louis@emacs.ch
2023-07-02T11:40:52Z
0 likes, 0 repeats
@forthy42 Hey per default keeps the connections alive, which is what I chose.
(DIR) Post #AXHakWOvpZRDiNmh4i by cel7t@emacs.ch
2023-07-02T11:43:57Z
0 likes, 0 repeats
@louis oh yes I agree, the documentation for fukamachi's libraries is generally quite poor, and they are also quite complicated. You have to be willing and capable of reading their source code to use them.I was not aware that Woo didn't work with other CL implementations!
(DIR) Post #AXI8tNhew4ttmowM8e by yogthos@mas.to
2023-07-02T18:06:26Z
0 likes, 0 repeats
@louis would be worth adding Babashka since it has HTTP Kit built in as wellhttps://github.com/babashka/babashkajust needs server.clj with:(ns server (:require [org.httpkit.server :as server]))(server/run-server (fn [_] {:body "Hello, World"}) {:port 3000})@(promise)and then run: bb server.cljI get ~12k req/sec using ab on my laptop
(DIR) Post #AXICtDasvBgqFXwuum by fourier@functional.cafe
2023-07-02T18:51:17Z
0 likes, 0 repeats
@louis Surprisingly bad performance by LW here. I knew it is slower than sbcl, but not that bad. Was it 32 or 64 bit version?
(DIR) Post #AXIDVQJm3ucaiVACe0 by louis@emacs.ch
2023-07-02T18:58:10Z
0 likes, 0 repeats
@fourier I was surprised too TBH. I use LW 64 bit Personal Edition on macOS ARM.I used compile buffer, I think LW makes a difference between Evaluate and Compile.Do you use LW?
(DIR) Post #AXIE1SCKbkiLoWxIlk by fourier@functional.cafe
2023-07-02T19:03:56Z
0 likes, 0 repeats
@louis Ye, I use linux and win32 versions
(DIR) Post #AXIEHhSncPEFnDPAkC by louis@emacs.ch
2023-07-02T19:06:51Z
0 likes, 0 repeats
@fourier If you want to replicate the test, this is the little tool to measure the reqs/sec I used:https://github.com/rakyll/heyI just instantiated a hunchentoot acceptor with a simple handler that returns a hello world. It would be very interested to see what performance you would get on the Linux version.
(DIR) Post #AXJiK6Pt0RsvXs422S by zellerin@emacs.ch
2023-07-03T12:18:12Z
0 likes, 0 repeats
@louis As other said, nice test.I would suggest that if speed is what you need then http/2 is a big difference. I have a very simple (~100 lines) toy http/2 "Hello World" server; h2load (different tool) reported on my few years old laptop something like 600k req/sec. However, hey apparently cannot do h2 w/o tls even though the switch is there, and tls wrapping with cl+ssl doubles the code size and halves the speed.Anyway, I think go server you tested might support h2 w/tls out of box, speedup there might be interesting.
(DIR) Post #AXJjmu28E28BUYFYeW by louis@emacs.ch
2023-07-03T12:34:37Z
0 likes, 0 repeats
@zellerin Thank you for your great tips! My "tests" however are not about tweaking performance to maximise throughput. They are more about getting a feeling for a language and its "default performance" regarding specific tasks. A few months ago I did a similar thing about JSON parsing for a very extensive list of languages, and the results were very surprising (if I find the post I'll send it to you).It's also not about shaming a specific language. They are all different and have different priorities. For example I think that SBCL is a great piece of software considering the "heavyness" of a Common Lisp.
(DIR) Post #AXJoGubB5VUhkVCvEe by zellerin@emacs.ch
2023-07-03T13:24:53Z
0 likes, 0 repeats
@louis Just for the record, I do not think you have shamed any language, and I definitely do like sbcl.And what you said about languages I suppose holds about web servers as well - they do have different priorities, so it would be unfair to judge them just based on speed.
(DIR) Post #AXORZZI3D5R40azHzU by louis@emacs.ch
2023-07-05T19:04:03Z
0 likes, 0 repeats
@cage I'm surprised too. Maybe it is an issue with LispWorks in Mac M1 or I did it wrong. Perhaps someone with LispWorks can recreate this test?