3 ms·
What do you mean? Even C# is measured in millions of lines per-second. The only compilers that are kind of slow these days deal with complex static type systems
by seanmcdirmid 14y ago
What do you mean? Even C# is measured in millions of lines per-second. The only compilers that are kind of slow these days deal with complex static type systems (Scala), whereas Go has a simple static type system and should compile fast.
- laureny 14y agoAgreed. In terms of compilation times, Scala feels as slow in compilation times as C++ did in the early 2000's. Kotlin and Ceylon are showing that it's possible to be a modern JVM language and still compile fast. Hopefully, Scala can learn from them.
- seanmcdirmid 14y agoMartin Odersky does care about compilation speed a lot and pulls out as many tricks as possible to make it faster. But Scala has a way powerful type system in a way that I doubt Kotlin and Ceylon are barely approaching. I don't think many want to give up scala's features for better compilation speed, which anyway can be mitigated via better incremental compilation (disclaimer, my experience is about 5 years out of date).
- meaty 14y agoWith c# though it has to compile it again at runtime which destroys your advantage.
- seanmcdirmid 14y agoThat hasn't been true for a long time (ngen.....).
- meaty 14y agoNgen is useless if you're deploying to IIS. Think of views, asp.net pages etc. You're to going to put them in the GAC are you. Ir makes pretty much no sense to ngen anything other than stuff exposed to com or core framework bits. All you do is fuck yourself at deploy time.
- seanmcdirmid 14y agoI've never done any asp.net programming, but then isn't C# competitive with everything else in that space (like python, ruby...)? .net has a pretty good back end and the only thing you really fight with is not instruction compilation/execution time, but garbage collection. GC is mainly why you might want to use C++ sometimes instead of C#.
- meaty 14y agoWell to be honest we decided to use go for a couple of things rather than c# (out logging back end and configuration store forked from doozer) and it ended up being used for considerably more in the end precisely because it is very easy to a) get deterministic GC behaviour and b) profile it.
- seanmcdirmid 14y agoIs there an implicit claim being made that go is already competitive with C# on performance? If so that would be huge, the CLR is very mature and tuned, much faster than the JVM. I'm also surprised to hear they are ahead on garbage collection. Assuming they are using a sweep and/or copy collector and not reference counting, why is it more deterministic than the CLR's? I'd like to see some benchmarks/numbers if you have them handy.
- meaty 14y agoI would write it up but you're not allowed to (check the license that comes with windows server and the .net SDK). Anecdotal evidence points to go being faster on nearly all counts bar regular expressions once you know what you are doing. The GC differences come from the fact that go does a hell of a lot less allocations. It's possible to write complex code in go which doesn't allocate or GC at all. The same is not true for the CLR. Fundamentally the GC in go is slower and causes more pauses but you can easily tune around it without shitty hacks like the disruptor pattern. Anyway numbers cannot be published thanks to Microsoft's suspicious intentions with their EULA so you'll have to compare yourself behind closed doors.
- beagle3 14y agoThat's what it's supposed to be, but somehow when I press "Go" on VS, in a project with <200,000 lines, it takes several seconds to compile and start.
- seanmcdirmid 14y agoThis is not the compilers fault but rather something choking somewhere else in your VS tool pipeline, most likely the debugger.