Brian Adkins wrote on 01/16/2016 11:54 PM:
Can you elaborate re: "reused bytes I/O buffers "  ?  One of the things I did 
in the C code was to reuse character arrays a lot and never malloc, but I'm less familiar 
with doing similar things in Racket.

Look at `read-bytes!`, `read-bytes-avail!`, and related procedures. Preferably on a buffer you reuse for each record. And remember that you don't always need to copy -- you can pass around byte range indexes, and you can even mutate the buffer. Then do something like you would in C (just with no pointer arithmetic, but at least you get safety and access to the higher-level language when you want).

1) I'd like to get to the point of being able to write expressive, "high level" 
code in Racket, in a similar manner as I've been accustomed to with Ruby, but with better 
performance than Ruby. Given Ruby typically trails the pack with respect to speed, that 
doesn't seem unreasonable.

I've found Racket performance acceptable for most purposes, including the general kind of records processing you're doing. I suspect the difference you're seeing in this case is due to something like some of Ruby's string ops being faster than Racket's (if that's true).

Neil V.

--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to