I just rewrote an existing C++ server in Racket in two days, dropping 2,000 C++ 
lines to 700 Racket lines.

The architecture of the previous server was based on fine planning and 
implementation, but quickly degraded from an 18-month succession of band-aids.  
Having laid out a replacement plan, I built a prototype in Racket.  The Racket 
implementation was really clear for me, but sadly about 20 times slower than 
its C++ predecessor.   I tracked half the problem to inefficient netstring 
parsing which brought me to 10 times.  The rest of the performance difference 
appeared to be networking throughput.

So, I was happy with this as a prototype, and it had cleared up enough logic 
that I could actually envision how to clean up everything C++-wise.  I realized 
that following the Racket work, I could probably drop my 2,000 C++ lines to 
1,500 nicer ones.  So, the prototyping had been useful.  

Then, something struck me.  I was running the default 6.1 Racket on my Debian 
8.  I thought that I'd see if anything changed performance-wise, so I placed 
Racket 6.2.900.17 into my /tmp directory and ran the server on that.

I have no idea what networking implementation facts have changed between 6.1 
and this snapshot, but it's now about 20% faster than the C++ server. The 
reimplemented service will remain in Racket.

Thanks to whomever it was that jacked up the networking speed.



-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to