Github user kiszk commented on the issue:

    https://github.com/apache/spark/pull/19811
  
    I think that it is good to have a loop to mainly reduce the byte code size 
and to reduce constant pool entries.
    ```
    int[] ints = new int[32768];
    ints[0] = 1;
    ints[1] = 1;
    ...
    ints[32767] = 1;
    ```
    will not consume constant pool entries for constant.  
    This code will generate a lot of java byte code for 32768 assignments (i.e. 
`aload getfield iconst sipush iastore`). They will be split into multiple 
methods. To call a method requires a few constant pool entries at caller side.
    
    I like to have a loop as possible. WDYT?



---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to