Earlier quoted context omitted.
Slightly tangential, but I think "Premature optimization is the root of all evil." is the most misquoted statement in the history of computer science. Most importantly, people tend to misinterpret "premature" to mean "any time before the software is done" or similar. I can't even count the number of times where I've worked on or watched a project where performance is important and the following series of events occur…
That is why the rewording I use is "First make it right, then make it fast". If you make it fast first, then that is premature optomization.
Why git is so fast (or why Java is not as fast as C)
71–80 of 110 posts
Re: Why git is so fast (or why Java is not as fast as C)
#72Earlier quoted context omitted.
The Git codebase has been heavily-optimized from the start. Its speed when branching/merging was its main selling point, ever since Linus started talking about it. The only way JGit would ever be equal-to or faster than Git is by using better algorithms. And somehow, I don't see this happening ;)
Nobody's claiming equal-to or faster - currently JGit is twice as slow so there's a lot of room for improvement. Faster than now, not faster than C.
Re: Why git is so fast (or why Java is not as fast as C)
#73Re: Why git is so fast (or why Java is not as fast as C)
#74Good article, but it seems to ignore the elephant in the room: the JVM's cold start times. For me, git's use case is being called from the command line, often interactively, between code editing sessions. It needs to start fast and finish fast, to not interrupt my workflow. The JVM's cold start times are huge. On the order of a second. Noticeably slow. So slow, that in the common case of committing a few files, the J…
Disclaimer: I'm very much not a Java/C# guy, so this might be totally barking up the wrong tree. :-) Would it be a speed win to keep some JVM processes "half-started" if load and memory use allowed? The next started Java app will use one of the already half started JVMs. You wouldn't need to do anything fancy to keep the JVMs around; if a half-started JVM wasn't used for so many seconds that it might be swapped out,…
Re: Why git is so fast (or why Java is not as fast as C)
#75I find it interesting to read that every single one of his criticisms of JGit would not need to apply to a C# implementation. Unsigned types, unmanaged memory allocation (Marshal.Alloc ), unsafe code with pointers, native P/Invoke access, value types (e.g. fixed arrays for his SHA-1 point), and an IDisposable convention for managing all the unmanaged trickery, C# has pretty much all the needed features. When optimizi…
I actually believe they're accessible in Java as well through JNI and JNA. But I'm hardly a Java expert.
Re: Why git is so fast (or why Java is not as fast as C)
#76Earlier quoted context omitted.
Yeah I just don't work that way. I work linearly :/
What type of work do you do that you never have urgent bug fixes and/or never have features that take more than a day to complete? Sure it's optimal to work linearly, but in the real world things come up. Now if you are looking for a reason to tell stakeholders to suck it up and wait, then poor branching support may help you, but that's a technical solution to a managerial problem. If you're interested in having the…
I've always worked to constrain non-linear development to the absolute minimum required because the technical costs are easily dwarfed by the human communication overhead and inherent organizational complexity engendered in multiple disparate branches of development.
Re: Why git is so fast (or why Java is not as fast as C)
#77Earlier quoted context omitted.
Yeah I just don't work that way. I work linearly :/
What type of work do you do that you never have urgent bug fixes and/or never have features that take more than a day to complete? Sure it's optimal to work linearly, but in the real world things come up. Now if you are looking for a reason to tell stakeholders to suck it up and wait, then poor branching support may help you, but that's a technical solution to a managerial problem. If you're interested in having the…
That's just the way I work.
Similarly, I don't use threads in programs unless I absolutely categorically have to. It's a similar sort of thing. Call me crazy :/
I did use git for a bit, and thought 'meh'. It didn't solve any real world problem I had.
Re: Why git is so fast (or why Java is not as fast as C)
#78Earlier quoted context omitted.
Check out nailgun if you're interested in using the JVM as a command-line tool without a cold-start. http://martiansoftware.com/nailgun/index.html
I was looking at this the other day and am concerned that it hasn't been updated since February, 2005. That's practically ancient in terms of software.
Re: Why git is so fast (or why Java is not as fast as C)
#79Earlier quoted context omitted.
Slightly tangential, but I think "Premature optimization is the root of all evil." is the most misquoted statement in the history of computer science. Most importantly, people tend to misinterpret "premature" to mean "any time before the software is done" or similar. I can't even count the number of times where I've worked on or watched a project where performance is important and the following series of events occur…
I always though that what that one quote meant was: measure, then optimize. It's no use tuning the hell out of a function that hardly features in your profiler results.
Re: Why git is so fast (or why Java is not as fast as C)
#80Earlier quoted context omitted.
What type of work do you do that you never have urgent bug fixes and/or never have features that take more than a day to complete? Sure it's optimal to work linearly, but in the real world things come up. Now if you are looking for a reason to tell stakeholders to suck it up and wait, then poor branching support may help you, but that's a technical solution to a managerial problem. If you're interested in having the…
What type of work do you do that you never have urgent bug fixes and/or never have features that take more than a day to complete? I've always worked to constrain non-linear development to the absolute minimum required because the technical costs are easily dwarfed by the human communication overhead and inherent organizational complexity engendered in multiple disparate branches of development.