2 ms·
Wow, that is crazy. For me (Swift 5.10) that single line is taking 11 seconds. Meanwhile, I have a 16,000 line app (importing AppKit, SceneKit and more) that co
by ks2048 2y ago
Wow, that is crazy. For me (Swift 5.10) that single line is taking 11 seconds. Meanwhile, I have a 16,000 line app (importing AppKit, SceneKit and more) that compiles in 8 seconds.
- ks2048 2y agoFollowing up with compile time of a few variations. let result:Double = -(1 + 1) + -(1 + 1) - 1 // 10.829s let result:Double = -(1 + 1) + -(1 + 1) // 1.724s let result:Double = (1 + 1) + (1 + 1) - 1 // 1.721s let result:Double = -(1 + 1) - 1 // 0.763s let result:Int = -(1 + 1) + -(1 + 1) - 1 // 0.571s let result:Double = -(1 + 1) + -(1 + 1) + 1 //error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions