News for hackers. Stuff that matters.
Re:Show HN: Realm (YC S11), a mobile database by seepel on Saturday July 19, 2014 @06:31PM (#8058976)
I'm a little late to the party, but I ran the benchmark inserts with cached statements on both my Macbook Pro and my iPhone 5S. sqlite definitely fairs better under this scenario.

That being said I still find the speed of Realm pretty impressive. And it's hard to gauge real world performance from this test. In my experience the real bottle necks around insert are upsets and establishing maintaining relationships.

For reference here are the benchmarks without reusing sqlite statements.

  Macbook Pro - Realm: 0.780414 sqlite: 0.464804 FMDB: 0.654659 
  iPhone 5S   - Realm: 2.235381 sqlite: 2.786381 FMDB: 3.336679
And with statement reuse

  Macbook Pro - Realm: 0.766406 sqlite: 0.189747 FMDB: 0.683823 
  iPhone 5S   - Realm: 2.214847 sqlite: 0.991864 FMDB: 2.832800
Interesting side note: FMDB seems to be spending just as much time finding the cached statement as sqlite takes to prepare a new one. I didn't expect that. I haven't dug into it at all, but I wouldn't be surprised if this due to the fact that the insert statement is relatively simple.

EDIT: Just fixed up formatting for the results

Re:Show HN: Realm (YC S11), a mobile database by Groxx on Sunday July 20, 2014 @07:20PM (#8061874)
That's pretty cool, and roughly what I saw in my emulator - maybe my fumbling actually did it right :) And very much agreed, Realm is pretty impressive, and micro-benchmarks like this aren't all that useful.

Have you set up a pull request / issue by any chance? It paints Realm in a bit worse of a light, but hopefully they'll merge it in and update the site.

Re:Show HN: Realm (YC S11), a mobile database by seepel on Wednesday July 23, 2014 @04:20AM (#8073375)
I didn't see the benchmark code in the repo, so I didn't really think about a pull request. Next time I find time I'll poke around a bit more. They are trivial changes though.