I tested using futures. While it is significantly faster than creating places, it is still also significantly slower than the single threaded solution without places and without futures:
~~~ (define (gini-index-futures subsets label-column-index) (let ([futures (flatten (for/list ([subset (in-list subsets)]) (for/list ([label (in-list (list 0 1))]) (future (lambda () (calc-proportion subset label label-column-index))))))]) (for/sum ([a-future (in-list futures)]) (touch a-future)))) ~~~ There always seems to be something blocking, so that only one core is used by the futures. Creating places is too expensive, so maybe I could create places at the very beginning before my program runs and always re-use those. -- 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.