rokitna
2018-11-21 11:29:40

@rokitna has joined the channel


luis.osa.gdc
2018-11-21 16:29:25

Hello everyone! I have been using Racket in toy projects for a couple of years. In the last months, I became interested in comparing Racket with Common Lisp. Just for fun, I compared the web-server performance with woo, a server written in CL (with libuv underneath). And I added my numbers to the benchmarks shown in the woo repository: https://github.com/fukamachi/woo/pull/73


luis.osa.gdc
2018-11-21 16:31:45

The numbers are not so important, but I wanted to ask for someone with more experience to review my implementation there. I just wrote a naive, straightforward port of what the CL code seemed to be doing.


luis.osa.gdc
2018-11-21 16:33:04

(if someone cares, of course :slightly_smiling_face: )


soegaard2
2018-11-21 16:33:16

Do you time startup time too?


soegaard2
2018-11-21 16:34:11

Did you compile to bytecode before running the benchmark?


jerome.martin.dev
2018-11-21 16:36:55

I think you may also want to disable continuations


luis.osa.gdc
2018-11-21 16:36:59

I used the benchmark script in the repository: https://github.com/fukamachi/woo/blob/master/benchmark/run-benchmark


luis.osa.gdc
2018-11-21 16:37:57

and no, I do not think that I did any bytecode compilation before running on my machine


luis.osa.gdc
2018-11-21 16:38:26

(sorry if I am not super precise, I did this several months ago … )


samth
2018-11-21 16:38:33

I doubt bytecode compilation will matter there


samth
2018-11-21 16:38:43

and that benchmark doesn’t capture any continuations


jerome.martin.dev
2018-11-21 16:39:44

right


soegaard2
2018-11-21 16:40:09

So the the web-server is started, and then then the timings are made?


soegaard2
2018-11-21 16:40:29

(just checking whether I understand the script)


samth
2018-11-21 16:41:54

i do get significantly better numbers with compiling the file first


luis.osa.gdc
2018-11-21 16:43:19

@soegaard2 I understand the same from the benchmark script (I just provided an “init command” that is passed to that script)


samth
2018-11-21 16:43:21

still noticeably behind tornado


luis.osa.gdc
2018-11-21 16:44:42

also, an important note: I provided numbers in that PR only for the Racket server, and asked the author to run it again in a comparable setup to all other servers … but just got the PR merged with no comment


soegaard2
2018-11-21 16:45:10

So the numbers are from two different servers?


jerome.martin.dev
2018-11-21 16:45:32

that would explain a lot of things x)


jerome.martin.dev
2018-11-21 16:46:07

as always with benchmarks, they’re not often meaningful :stuck_out_tongue:


luis.osa.gdc
2018-11-21 16:47:33

no, what I mean is that, if you open the benchmark page, there are numbers for Tornado, Woo, etc … those numbers have been obtained by the author previously in a setup unknown to me … in my PR, I just provided numbers for the Racket server, without overwriting the previous results with those that I could measure on my own setup



jerome.martin.dev
2018-11-21 16:48:13

yeah, so they’re currently meaningless until they restart a full benchmark


luis.osa.gdc
2018-11-21 16:48:20

@jerome.martin.dev completely agree, this is just an exercise for fun … benchmarks can be very misleading :slightly_smiling_face:


jerome.martin.dev
2018-11-21 16:48:50

I’m curious to see the results though


luis.osa.gdc
2018-11-21 16:49:08

one can run all the benchmarks locally and compare, of course


jerome.martin.dev
2018-11-21 16:49:12

yep


samth
2018-11-21 16:52:04

i ran it locally for some of them and the results are in line with that page


jerome.martin.dev
2018-11-21 16:53:37

maybe racket-on-chez will make a difference :stuck_out_tongue:


luis.osa.gdc
2018-11-21 16:55:32

ah yes, I did this in June and it was Racket 6.12 at the time


jerome.martin.dev
2018-11-21 16:56:30

Anyways I think we have better to do right now than working on those kind of optimization, but it’s still a good indicator that there’s some more work to do until the web-server becomes a real game changer in terms of performance. Considering it’s one of our objectives, obviously, but I’m not even sure it is for now.


jerome.martin.dev
2018-11-21 16:57:46

But thanks for adding racket to the benchmark :wink:


samth
2018-11-21 16:58:41

racketcs is about the same, maybe a bit slower


luis.osa.gdc
2018-11-21 17:01:40

yep, performance is not the be-all and end-all — I just thought I could bring my effort to the attention of the community just in case someone knows better than me :slightly_smiling_face:


lexi.lambda
2018-11-21 17:49:36

Can anyone in this channel comment on the design of the class system? Maybe @mflatt or @robby? I’m trying to understand the behavior I’ve just reported in https://github.com/racket/racket/issues/2395. (I’m willing to fix it myself, but I don’t know what the fix is—it could be a documentation change or an implementation change.)


mflatt
2018-11-21 17:50:38

I expect that it will have to be a documentation improvement, but I haven’t looked closely – and won’t be able to look closely until later today


lexi.lambda
2018-11-21 17:50:50

Okay, no worries.


lexi.lambda
2018-11-21 17:51:27

I’ll operate under the assumption I’ll have to work around the behavior, then. :)


macocio
2018-11-21 18:54:35

Is there any way to time a require?


samth
2018-11-21 18:55:50

@macocio use dynamic-require