Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I did a small benchmark on some trivial code: https://gist.github.com/markuswustenberg/8be63c6e95dc5bb50ff...

Results vary a bit on my machine, but it's pretty much the same (unless I'm doing something wrong, please point it out if so):

  $ make benchmark
  go test -bench=.
  goos: darwin
  goarch: arm64
  pkg: sqlite
  BenchmarkWriteBlogPost/write_blog_post_without_WAL-8              6036     186719 ns/op
  BenchmarkWriteBlogPost/write_blog_post_with_WAL-8               102567      11169 ns/op
  BenchmarkWriteBlogPost/write_blog_post_with_WAL_and_Go_mutex-8            104228      11226 ns/op
  PASS
  ok   sqlite 3.833s


My mistake, this isn’t parallel. See https://news.ycombinator.com/item?id=33911491 for a parallel version with no readers.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: