I don't have any suggestions for you but I agree that it is an important 
issue. My programming experience is primarily confined to R but I've 
recently started tinkering with Racket. My primary interest in Racket is to 
expand my programming horizons but I also see the potential to use it at 
work as replacement for R for building simulation models. The idea that 
Racket could replace R for those tasks is based on the expectation that 
Racket would be faster than R (relatively low bar for Racket to clear) but 
similarly expressive. However, in my 10+ years as an R programmer, there is 
a lot of hard-won knowledge of performance traps to avoid and optimization 
tricks to try. As I move forward learning Racket, it will be interesting to 
see how my naive Racket code stacks up to my better optimized R code. I 
personally will very much appreciate any efforts targeted towards making 
performance issues more transparent to Racket beginners.

Thanks,

Travis



On Friday, February 1, 2019 at 10:28:12 PM UTC-8, Alex Harsanyi wrote:
>
> Someone asked recently for help on Reddit[1] with a Racket performance 
> issue.
> The problem was they they were constructing a large list by appending many
> short lists repeatedly; their code was calling `(set!  result (append 
> result
> shortList))` in a loop and this was slow (unsurprisingly.)
>
> While trying to help them out, it occurred to me that this person was 
> perhaps
> translating a program from Python to Racket, maybe to evaluate Racket.  The
> problem is that list-append operations are efficient in Python, but the
> natural corresponding choice in Racket, the `append` function, is not.  I
> wonder how many people are in a similar situation, where they try to 
> convert a
> Python program to Racket, see that the performance is bad, and conclude 
> that
> Racket is slow -- Every time Racket is mentioned on Reddit or HN there is 
> at
> least one person mentioning that Racket is slow and sadly they may even 
> have
> their own data to prove it.
>
> Given the recent discussion in this group about promoting Racket, I am
> wondering what can we do to help this category of people?  These might be
> persons who never ask for help in any forum, after all the Racket
> documentation is good enough to help anyone who is willing to read it.
>
> One improvement that I can think of is to add a performance description to
> each function that operates on the basic data structures (lists, vectors,
> hash-tables)
>
> What do others think?
> Alex.
>
> [1]: 
> https://www.reddit.com/r/Racket/comments/am5r2w/how_to_read_a_file_linebyline_efficiently/
>

-- 
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