-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Closed
Milestone
Description
When decompressing file data from a bz2 compressed file, Go is much slower than other popular languages' implementations. For the simple sample program at http://play.golang.org/p/e0N9J8fsvz, I've incuded pprof output for Go v 1.1 and 1.2rc2. The program walks a directory of BZ2 compressed text log files, opens the file and passes the reader to a function that performs an io.copy() to ioutil.discard. The results are almost exactly the same when processing each text line from the reader with bufio.NewScanner(). Using large bufio readers or no bufio handling at all does not impact the overall performance of the bzip2 functionality. This test was conducted on 64bit Ubuntu Linux 13.10 using 64bit Go binaries. Go 1.2rc2 was downloaded directly from the Go site, whereas 1.1 was installed as an Ubuntu package.
Attachments:
- bztest-1.2rc2-discard.txt (5862 bytes)
- bztest-1.1-discard.txt (5859 bytes)