ggit icon indicating copy to clipboard operation
ggit copied to clipboard

Performance comparisons between ggit, git, jgit, grit.

Open jbrukh opened this issue 12 years ago • 2 comments

jbrukh avatar Sep 24 '12 14:09 jbrukh

I think the fixed cost of starting a Go program might be slightly greater than that of starting Git - at least on my setup. Here's the shortest non-Hello-World Go program I've written:

package main

import (
    "time"
    "os"
    "fmt"
)

func main() {
    fmt.Fprintln(os.Stdout, time.Now().UnixNano())
}

On my Mac, the above takes slightly longer than "git cat-file -p 5b27f03a" (where 5b27f03a is the packed delta of a blob), and 1.3 to 1.4x as long as "git --version". (Anecdotally: I've been running a 1,200-iteration loop over and over again for each command.)

Same goes for Go Hello World.

MikeBosw avatar Nov 01 '12 03:11 MikeBosw

No Internet to send you latest benches, but reading packed objects is on the order of 8000 ns. Compared with something like 60000 to read loose objects.

Go programs have a runtime built into the executable so not surprising that it is slower than pure C. Nonetheless, the figures that you gave are pretty damn good compared with Java.

On Oct 31, 2012, at 11:23 PM, MikeBosw [email protected] wrote:

I think the fixed cost of starting a Go program might be slightly greater than that of starting Git - at least on my setup. Here's the shortest non-Hello-World Go program I've written:

package main import ( "time" "os" "fmt") func main() { fmt.Fprintln(os.Stdout, time.Now().UnixNano())}

On my Mac, the above takes slightly longer than "git cat-file -p 5b27f03https://github.com/jbrukh/ggit/commit/5b27f03a" (where 5b27f03 https://github.com/jbrukh/ggit/commit/5b27f03a is the packed delta of a blob), and 1.3 to 1.4x as long as "git --version". (Anecdotally: I've been running a 1,200-iteration loop over and over again for each command.)

Same goes for Go Hello World.

— Reply to this email directly or view it on GitHubhttps://github.com/jbrukh/ggit/issues/17#issuecomment-9969896.

jbrukh avatar Nov 01 '12 04:11 jbrukh