A new feature added to groovy closures

5 views
Skip to first unread message

Roshan Dawrani

unread,
Oct 18, 2010, 3:37:14 AM10/18/10
to bangalor...@googlegroups.com, ig...@googlegroups.com
Hi,

Groovy recently added a new feature to its closures - memoization - as a performance optimization.

Read here for more details: http://goo.gl/vnUz

--
rgds,
Roshan
http://roshandawrani.wordpress.com/
http://twitter.com/roshandawrani

Nibin Varghese

unread,
Oct 18, 2010, 6:04:22 AM10/18/10
to bangalor...@googlegroups.com, ig...@googlegroups.com
Thanks for sharing!

Saager Mhatre

unread,
Oct 19, 2010, 2:06:06 AM10/19/10
to bangalor...@googlegroups.com, ig...@googlegroups.com
Roshan, haven't been following GPars as well as I should have; but, I believe GParsPool makes memoizations thread-safe. Do those guarantees hold in the Groovy port?

On Mon, Oct 18, 2010 at 1:07 PM, Roshan Dawrani <roshan...@gmail.com> wrote:

- dexter

Roshan Dawrani

unread,
Oct 19, 2010, 2:13:54 AM10/19/10
to bangalor...@googlegroups.com, ig...@googlegroups.com
Hi Saager,

I don't think so, but then I am not an expert in GPars myself. Why don't you bring it up on the main groovy mailing list?

I am sure Vaclav will be happy to clarify it - having done both memoize() implementation in GPars as well as its port to Groovy

Saager Mhatre

unread,
Oct 19, 2010, 6:07:31 AM10/19/10
to bangalor...@googlegroups.com, ig...@googlegroups.com
yeah, i need to get back on the groovy-dev and groovy-user lists; it'll have to wait for the weekend
a quick look at the code seemed to indicate that it wasn't really thread safe, java.util.concurrent.ConcurrentHashMap doesn't lock for retrievals
- d
Reply all
Reply to author
Forward
0 new messages