[racket] Efficiency of tight loops in Racket

From: Eduardo Bellani (ebellani at gmail.com)
Date: Mon Jan 17 13:40:53 EST 2011

Maybe it would be a nice idea to add a link to this paper in the docs?

On 01/14/2011 11:28 PM, Robby Findler wrote:
> The construct 'thread' is as you describe. The construct 'future',
> however, could easily (in a generic sense) be called a 'thread which
> multi-threaded enabled cpu will run truly in parallel'. A place, too.
> They have different restrictions. The words have precise technical
> meanings in our language manuals, of course.
> 
> If you want to read more, try this:
> 
>   http://www.eecs.northwestern.edu/~robby/pubs/papers/oopsla2010-stdff.pdf
> 
> Robby
> 
> On Fri, Jan 14, 2011 at 5:35 PM, Harry Spier <harryspier at hotmail.com> wrote:
>> Thanks.
>>
>> Perhaps some one could explain this aside in section 18.9 "Parallelism with
>> futures"
>>
>> Other functions, such as thread, support the creation of reliably concurrent
>> tasks. However, thread never run truly in parallel, even if the hardware and
>> operating system support parallelism.
>>
>> Does that mean there is no way in Racket to create threads which a
>> multi-threaded enabled cpu will run truly in parallel?
>>
>> Harry Spier
>>
>>
>>
>>> Date: Fri, 14 Jan 2011 15:30:22 -0600
>>> Subject: Re: [racket] Efficiency of tight loops in Racket
>>> From: robby at eecs.northwestern.edu
>>> To: harryspier at hotmail.com
>>> CC: matthias at ccs.neu.edu; eli at barzilay.org; users at racket-lang.org
>>>
>>> Please look at the future and the places library. These are still
>>> relatively new parts of Racket, but we'd love to have your feedback.
>>> Here's an overview, leading to futures:
>>>
>>> http://docs.racket-lang.org/guide/performance.html
>>>
>>> Robby
>>>
>>> On Fri, Jan 14, 2011 at 2:12 PM, Harry Spier <harryspier at hotmail.com>
>>> wrote:
>>>> Thanks Matthias.
>>>>
>>>> From whats been said perhaps the way to go is to make a C wrapper to the
>>>> C
>>>> interface to the latest version of ImageMagick and then go through the
>>>> FFI
>>>> to interface to Racket.
>>>>
>>>> Also someone mentioned the use of parallel processing.  It seems to me
>>>> that
>>>> an OCR application would be the ideal application for parallel
>>>> processing.
>>>> I.e. the analysis of one letter is completely independent of the
>>>> analysis of
>>>> another letter. So for example if you had a dual core processor with
>>>> multithreading enabled you could analyse 4 letters concurrently etc. by
>>>> setting up 4 threads.
>>>>
>>>>  Is it possible on a PC (windows or linux) in Racket or in fact in any
>>>> language (even assembler) to check if it has a multi-core processors and
>>>> how
>>>> many cores and/or multi-threading enabled.  In which case you would know
>>>> how
>>>> many threads to set up to process letters in parallel?
>>>>
>>>>
>>>> Thanks,
>>>> Harry Spier
>>>>
>>>>
>>>>
>>>>> Subject: Re: [racket] Efficiency of tight loops in Racket
>>>>> From: matthias at ccs.neu.edu
>>>>> Date: Fri, 14 Jan 2011 12:12:28 -0500
>>>>> CC: eli at barzilay.org; users at racket-lang.org;
>>>>> robby at eecs.northwestern.edu
>>>>> To: harryspier at hotmail.com
>>>>>
>>>>>
>>>>> It's an experimental package under development for use with teaching
>>>>> materials. It's not ready for anything really -- Matthias (I know, I
>>>>> wrote
>>>>> it)
>>>>>
>>>>>
>>>>> On Jan 14, 2011, at 9:59 AM, Harry Spier wrote:
>>>>>
>>>>>>
>>>>>> I thought I saw somewhere in the Racket documentation a few weeks ago
>>>>>> that there is another graphics package in Racket that even has a
>>>>>> function to
>>>>>> create a binary matrix from a picture. But when I tried to find it
>>>>>> yesterday
>>>>>> I couldn't (I don't remember the name or where in the documentation I
>>>>>> saw
>>>>>> it).
>>>>>>
>>>>>> Does anyone know what package that could be?
>>>>>>
>>>>>> Thanks,
>>>>>> Harry
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> From: eli at barzilay.org
>>>>>>> Date: Fri, 14 Jan 2011 09:47:24 -0500
>>>>>>> To: vasishtha.spier at gmail.com
>>>>>>> CC: matthias at ccs.neu.edu; users at racket-lang.org;
>>>>>>> robby at eecs.northwestern.edu; harryspier at hotmail.com
>>>>>>> Subject: Re: [racket] Efficiency of tight loops in Racket
>>>>>>>
>>>>>>> 12 hours ago, Harry Spier wrote:
>>>>>>>> 2) interface to ImageMagick (which I use to create my binary page
>>>>>>>> representation)
>>>>>>>
>>>>>>> Note BTW that the ImageMagick interface that comes with racket was
>>>>>>> made as an example for an interface, so it wasn't kept up to date
>>>>>>> with
>>>>>>> the current API. (I don't know what changed, but given that a
>>>>>>> number
>>>>>>> of years have passed, I'm guessing that updates are needed.)
>>>>>>>
>>>>>>> --
>>>>>>> ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
>>>>>>> http://barzilay.org/ Maze is Life!
>>>>>
>>>>
>>
> _________________________________________________
>   For list-related administrative tasks:
>   http://lists.racket-lang.org/listinfo/users


-- 
Eduardo Bellani

omnia mutantur, nihil interit.


Posted on the users mailing list.