I was playing with JProfiler evaluation version, and was a bit surprised to see that after my expected CPU-heavy functions, third place “hotspot” were calls to
15.1% - 35,276 ms - 464,945,919 hot spot inv. kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull
That is… way bigger than I thought it would be. Granted, I’ve got a tight loop that is checking the distance^2 between 2D points over and over, and I haven’t done any sort of sane distance-bucketing to speed it up yet, but still, 15% seemed like a lot.
Cost of doing business? Is this something that could be optimized out? Is there some annotation I could add that indicates “Check if this is null at the beginning for the first few thousand calls, then relax a bit and don’t check every single time.”