Re: Minor performance improvement to java.lang.ModuleLayer.findModule(String name)

2017-12-07 Thread Andrej Golovnin
Hi Claes, > this seems like a very reasonable improvement. I can help sponsor it. Thanks a lot! > What I think is really needed in this area is some microbenchmarks that sets > up > multiple and more complex (but somewhat realistic) Layers of modules and test > various > queries, so that we ca

Re: Minor performance improvement to java.lang.ModuleLayer.findModule(String name)

2017-12-07 Thread Alan Bateman
On 07/12/2017 10:00, Andrej Golovnin wrote: Hi all, when we try to find a module which is not in the current layer, then we access the map 'nameToModule' in the parent layers two times in the lines 849-850: The change looks okay (I'm pretty sure it was just an oversight as this code changed se

Re: Minor performance improvement to java.lang.ModuleLayer.findModule(String name)

2017-12-07 Thread Claes Redestad
Hi Andrej, this seems like a very reasonable improvement. I can help sponsor it. What I think is really needed in this area is some microbenchmarks that sets up multiple and more complex (but somewhat realistic) Layers of modules and test various queries, so that we can profile and get a tab o

Minor performance improvement to java.lang.ModuleLayer.findModule(String name)

2017-12-07 Thread Andrej Golovnin
Hi all, when we try to find a module which is not in the current layer, then we access the map 'nameToModule' in the parent layers two times in the lines 849-850: 846return layers() 847 .skip(1) // skip this layer 848 .map(l -> l.nameToModule) 849