when doing data cleaning, adding the customized func is pretty needed.
such as the UDF in spark.
So, I wrote a implicit class and add all my wanted func into it, such as:
too many implicit methods will decrease the compilation speed of scala?
My experience is that using implicit classes for simple extension methods as in your example does not result in exceptionally slow compilation (it is rather other usages of implicits that can make compilation times high if the code base is large).
You can always investigate this in your setting by comparing to a simple object MyUtils that has “normal” methods, like in MyUtils.cleanX(number) and see if compile times are similar.