Re:Performance These Days
by corysama on Friday April 22, 2016 @12:50AM
(#11547117)
objc_msgSend is amazingly fast considering everything it is trying to accomplish. But, it is amazingly slow considering what it actually does 99% of the time in practice: call a single function repeatedly without variation that could have been determined at compile time, but wasn't.
I sometimes come across companies making iOS products that don't heavily leverage Apple's SDKs (games) but still use 100% ObjC instead of C or C++ for some reason. Best I can guess is because Apple said that's what you are supposed to do. ObjC is very nice. But, some of these companies have measured upwards of 50% of their CPU time being spent inside objc_msgSend and I question how much benefit they are getting in return.
Meanwhile, I have measured a direct, immediate correlations between performance issues coming and going in my own apps to drops and recoveries in revenue per day in those apps.
My point is: The widespread theme of valuing productivity over performance is very wise. But, I frequently see it being applied in knee-jerk, unwise situations. Getting good performance is difficult. Working in high-productivity languages/styles is fun. I know you'd rather work on stuff that's fun. But, having fun making a product that performs badly and drives users away isn't as much fun in the end as it seems in the beginning.
I sometimes come across companies making iOS products that don't heavily leverage Apple's SDKs (games) but still use 100% ObjC instead of C or C++ for some reason. Best I can guess is because Apple said that's what you are supposed to do. ObjC is very nice. But, some of these companies have measured upwards of 50% of their CPU time being spent inside objc_msgSend and I question how much benefit they are getting in return.
Meanwhile, I have measured a direct, immediate correlations between performance issues coming and going in my own apps to drops and recoveries in revenue per day in those apps.
My point is: The widespread theme of valuing productivity over performance is very wise. But, I frequently see it being applied in knee-jerk, unwise situations. Getting good performance is difficult. Working in high-productivity languages/styles is fun. I know you'd rather work on stuff that's fun. But, having fun making a product that performs badly and drives users away isn't as much fun in the end as it seems in the beginning.