gortiz commented on code in PR #10371:
URL: https://github.com/apache/pinot/pull/10371#discussion_r1126048198


##########
pinot-core/src/main/java/org/apache/pinot/core/operator/filter/FilterOperatorUtils.java:
##########
@@ -28,9 +28,207 @@
 
 
 public class FilterOperatorUtils {
+
+  private static volatile Implementation _instance = new Implementation();

Review Comment:
   It doesn't. Volatile is expensive in x86 if and only if there are writes and 
reads. In a scenario like this one, where the attribute will be changed once at 
startup. Also, this code is not in the hotpath (row execution) but in the 
planning phase. There are quite more expensive costs like our heavily usage of 
allocation in the planning phase.
   
   Anyway, we can remove it if you prefer that.
   
   References: 
   * https://stackoverflow.com/questions/4633866/is-volatile-expensive



-- 
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: commits-unsubscr...@pinot.apache.org

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


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

Reply via email to