pettyjamesm opened a new pull request #670: Optimize Path Name Escaping
URL: https://github.com/apache/hive/pull/670
 
 
   Micro-optimize `FileUtils.escapePathName` implementation to avoid using 
`String.format` when escaping characters inside of a loop. The benchmark below 
calls FileUtils.escapePathName  passing a 10 character string where every odd 
indexed character requires escaping.
   
   ```
   # VM version: JDK 1.8.0_211, VM 25.211-b12
   # VM options: -Dfile.encoding=UTF-8
   # Warmup: 10 iterations, 500 ms each
   # Measurement: 3 iterations, 500 ms each
   # Benchmark mode: Throughput, ops/time
   # Parameters: (valueLength = 10)
   ...
   
   Benchmark                                             (valueLength)   Mode  
Cnt      Score     Error   Units
   BenchmarkHivePathEscaping.hiveEscapePathName                  10  thrpt    3 
   438.325 ±   7.215  ops/ms
   BenchmarkHivePathEscaping.optimizedEscapePathName             10  thrpt    3 
 11589.837 ± 564.068  ops/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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to