[ cdk-Feature Requests-2020244 ] Test if static String[] help performance and memory

View: New views
1 Messages — Rating Filter:   Alert me  

[ cdk-Feature Requests-2020244 ] Test if static String[] help performance and memory

by SourceForge.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Feature Requests item #2020244, was opened at 2008-07-17 06:54
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=370024&aid=2020244&group_id=20024

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Egon Willighagen (egonw)
Assigned to: Nobody/Anonymous (nobody)
Summary: Test if static String[] help performance and memory

Initial Comment:

>
> On Thu, Jul 17, 2008 at 6:24 AM, Rajarshi Guha <rguha@...> wrote:
>  
>> On Jul 17, 2008, at 12:19 AM, Egon Willighagen wrote:
>>    
>>> On Thu, Jul 17, 2008 at 5:13 AM,  <rajarshi@...> wrote:
>>>      
>>>> +    public String[] getDescriptorNames() {
>>>> +        return new String[]{
>>>> +                "PPSA-1", "PPSA-2", "PPSA-3",
>>>> +                "PNSA-1", "PNSA-2", "PNSA-3",
>>>> +                "DPSA-1", "DPSA-2", "DPSA-3",
>>>> +                "FPSA-1", "FPSA-2", "FPSA-3",
>>>> +                "FNSA-1", "FNSA-2", "FNSA-3",
>>>> +                "WPSA-1", "WPSA-2", "WPSA-3",
>>>> +                "WNSA-1", "WNSA-2", "WNSA-3",
>>>> +                "RPCG", "RNCG", "RPCS", "RNCS",
>>>> +                "THSA", "TPSA", "RHSA", "RPSA"
>>>> +        };
>>>> +    }
>>>>        
>>> I was wondering if the code performance would increase if such static
>>> labels String[] was made a private final static instead of creating a
>>> new String[] each time...
>>>      
>> Possibly - but I'd think other aspects (such as surface area calculation)
>> will overshadow that performance hit. Also, it would only be applicable to
>> descriptors with fixed-length values (i.e., not dependent on params)
>>    
> True, but for memory allocation it would do much good, not? If this
> array gets allocated once for each molecule, I can imagine that it
> will put some stress on the garbage collection in a HTVS setting, not?
>  


----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=370024&aid=2020244&group_id=20024

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Cdk-devel mailing list
Cdk-devel@...
https://lists.sourceforge.net/lists/listinfo/cdk-devel
LightInTheBox - Buy quality products at wholesale price