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

Thanks for the feedback, benchmarks are notoriously difficult to get accurate (and fair), which is exactly why we published the benchmark code. We will incorporate your feedback to improve them.


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


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.


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.


Great! I don't know enough iOS-SQLite to confidently tweak it myself, and my small experiment (in an emulator, so ginormous caveats apply) gave mostly-unbelievable results so I somewhat doubt I did it right.

I'll definitely watch with interest! I'd love a safe, faster, easier data store than SQLite. I'm certain such a thing is possible, and it would address a massive range of uses. Good luck though - SQLite is pretty fantastic, it's a tough competitor to have :)


Should I submit an Issue on github to help push this, or is it relatively certain that it'll get done? If I get time + a device provisioning profile, I could also try to do it myself, but that's not likely to be any time soon :)




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

Search: