HNHacker News
TopNewBestAskShowJobs

zhenjl

373 karma · joined May 28, 2013

submissionscomments
zhenjl··on Benchmarking Integer Compression in Go
The algorithm is EWAH, not WAH. It's also by Daniel lemire.
zhenjl··on Benchmarking Integer Compression in Go
Thanks for commenting!

And you are absolutely correct about the bar charts. Not exactly sure why I chose line but they have been replaced now.

The testing didn't use the built-in benchmark mechanisms but it did use the *testing.T mechanism. It's basically runs of different algorithms on the same set of pre-loaded integers. And then I recorded the time (ns) it took to run compression and decompression (time.Since(now).Nanoseconds() where now was time.Now()).

The caching effect should be pretty similar for all the algorithms since they work off the same LARGE slice of data, afaict.

I will update the article to reflect the testing methodology (may be a few days before I can get to it though.)

THanks

zhenjl··on Benchmarking Bloom Filters and Hash Functions in Go
Author here. (same comment posted to reddit)

@bradfitz thanks for the comments and suggestion. I updated the code based on your suggestion (not allocate for every add/check) and the performance improved by 25+%!! Appreciate it!

I updated the blog and here's the gist that contains the latest results: https://gist.github.com/zhenjl/6515577

zhenjl··on Benchmarking Bloom Filters and Hash Functions in Go
Sorry for the delay in responding there. Hadn't check this for a couple of days.

You are correct. In fact, I am allocating in both standard and partitioned Check() implementations, in the bits() func.

I can pre-allocate during New() and keep using the same slice without re-make.

Thanks for the suggestion! I will update and re-run.

I also need to go back and figure out the murmur3 implementation is not working.

zhenjl··on Benchmarking Bloom Filters and Hash Functions in Go
Austin, yeah pretty sure it's broken, unfortunately. I used an implementation another person ported but results seem to come out weird. I need to figure out why when I get a moment, or do a port of my own.
zhenjl··on Testing MsgPack and BSON
Good points. Both thrift and protobuf (and Avro) seemed heavy weight due to their requirements. We wanted something lightweight, thus BSON and MsgPack.

In terms of rewriting a bunch of code, msgpack and bson both easily marshall/unmarshall in just a few lines of code so not a lot of rewriting. Libraries exist for all types of languages.

Maybe I need to update my criteria. Thx for the comment tho.

zhenjl··on Show HN: Google City Hash re-implemented in Go
just ported cityhash's test program over to Go and passed!!

Type casting like this makes my brain hurt.

b = uint32(int64(b) * int64(c1) + int64(int8(v)))

zhenjl··on GitHub's on your phone
Hm..is it me or there's no way to switch branch using the mobile view..
zhenjl··on CSS3 Animations with special effects
This is cool. Anyone know what type of license this has? I can't find it on github or the site.
zhenjl··on Show HN: Learn Your Favorite Editor With Spaced Repetition
Interesting site. Good timing too as I am just starting to move from VIM to WebStorm. Not exactly sure how well this works though. I find that the best way to learn a new editor is just to immerse oneself in the editor and go through a week or two of editing, either with your own project or just follow a book/video.
zhenjl··on Breeze is closing on August 1
What about Google groups as a replacement? Only potential problem is it may go the way of Google Reader?
← PreviousPage 2 of 2