[ 
https://issues.apache.org/jira/browse/GROOVY-11309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17815463#comment-17815463
 ] 

ASF GitHub Bot commented on GROOVY-11309:
-----------------------------------------

codecov-commenter commented on PR #2054:
URL: https://github.com/apache/groovy/pull/2054#issuecomment-1933196729

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2054?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Comparison is base 
[(`359ee64`)](https://app.codecov.io/gh/apache/groovy/commit/359ee64eda6bdafde7fa5c53ccab38f5e89df493?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 68.5308% compared to head 
[(`749e225`)](https://app.codecov.io/gh/apache/groovy/pull/2054?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 68.5283%.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   [![Impacted file tree 
graph](https://app.codecov.io/gh/apache/groovy/pull/2054/graphs/tree.svg?width=650&height=150&src=pr&token=1r45138NfQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/groovy/pull/2054?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #2054        +/-   ##
   ==================================================
   - Coverage     68.5308%   68.5283%   -0.0025%     
   + Complexity      29178      29177         -1     
   ==================================================
     Files            1422       1422                
     Lines          113495     113502         +7     
     Branches        19548      19549         +1     
   ==================================================
   + Hits            77779      77781         +2     
   - Misses          29178      29181         +3     
   - Partials         6538       6540         +2     
   ```
   
   
   | 
[Files](https://app.codecov.io/gh/apache/groovy/pull/2054?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[...rg/codehaus/groovy/classgen/AsmClassGenerator.java](https://app.codecov.io/gh/apache/groovy/pull/2054?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL0FzbUNsYXNzR2VuZXJhdG9yLmphdmE=)
 | `84.1482% <100.0000%> (+0.0826%)` | :arrow_up: |
   
   ... and [2 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/2054/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   </details>




> Optimise bytecode for empty list expressions
> --------------------------------------------
>
>                 Key: GROOVY-11309
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11309
>             Project: Groovy
>          Issue Type: Improvement
>          Components: class generator, Compiler, performance
>    Affects Versions: 2.5.23, 3.0.20, 4.0.18, 5.0.0-alpha-5
>            Reporter: Oscar N
>            Priority: Minor
>
> I have the following code:
> {code:groovy}
> class Book {
>     String title
>     String blurb = ''
>     List<String> authors = []
> }
> {code}
> When checking the compiled output, the creation of the empty list goes 
> through ScriptBytecodeAdapter:
> {code:java}
> @Generated
> public Book() {
>     String var1 = "";
>     this.blurb = var1;
>     List var2 = ScriptBytecodeAdapter.createList(new Object[0]);
>     this.authors = var2;
>     MetaClass var3 = this.$getStaticMetaClass();
>     this.metaClass = var3;
> }
> {code}
> This case can be simplified to "List var2 = new ArrayList()", which would 
> avoid some overhead and slightly improve @POJO support.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to