luben commented on PR #50057:
URL: https://github.com/apache/spark/pull/50057#issuecomment-2866965601

   I will rise the issue with the upstream. BTW, here is minimized benchmark 
that still exhibits the same difference:
   
   ```
     import com.github.luben.zstd.ZstdOutputStreamNoFinalizer;
     import java.io.ByteArrayOutputStream;
   
     public class Main {
   
         static byte[] data = new byte[256 * 1024 * 1024];
   
         static {
             for (int i = 0; i < 256 * 1024 * 1024; i++) {
                 data[i] = (byte) i;
             }
         }
   
         public static void main(String[] args) throws Exception {
             long start = System.nanoTime();
             for (int j = 0; j < 16; j++) {
                 ByteArrayOutputStream baos = new ByteArrayOutputStream();
                 ZstdOutputStreamNoFinalizer os = new 
ZstdOutputStreamNoFinalizer(baos)
                         .setLevel(9)
                         .setWorkers(0);
                 os.write(data);
                 os.close();
             }
             System.out.println("cost " + (System.nanoTime() - start) / 
1000000L + "ms");
         }
     }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to