|
|
|
|
|
by robenkleene
3736 days ago
|
|
Thanks for the detailed response, to summarize it sounds like your position is that: 1. Objective-C's compile time memory management is actually slower than JavaScript's garbage collection. 2. The performance consequences of Objective-C message sending are greater than JavaScript's JIT compilation. And furthermore, that JIT compilation is actually an advantage due to the other optimization techniques it enables. I'd like to see a more direct comparison with benchmarks, but I can see where you're coming from. |
|
I realized another issue, too: I don't think it's possible to perform scalar replacement of aggregates on Objective-C objects at all, whereas JavaScript engines are now starting to be able to escape analyze and SROA JS values. SROA is another critical optimization because it converts memory into SSA values, where instcombine and other optimizations can work on them. Again, Swift fixes this with SIL-level SROA.