{"action":"created","issue":{"url":"https://api.github.com/repos/louischatriot/nedb/issues/34","labels_url":"https://api.github.com/repos/louischatriot/nedb/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/louischatriot/nedb/issues/34/comments","events_url":"https://api.github.com/repos/louischatriot/nedb/issues/34/events","html_url":"https://github.com/louischatriot/nedb/issues/34","id":15860925,"number":34,"title":"It looks like we build similar database engine","user":{"login":"sergeyksv","id":1007040,"avatar_url":"https://avatars.githubusercontent.com/u/1007040?v=3","gravatar_id":"","url":"https://api.github.com/users/sergeyksv","html_url":"https://github.com/sergeyksv","followers_url":"https://api.github.com/users/sergeyksv/followers","following_url":"https://api.github.com/users/sergeyksv/following{/other_user}","gists_url":"https://api.github.com/users/sergeyksv/gists{/gist_id}","starred_url":"https://api.github.com/users/sergeyksv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergeyksv/subscriptions","organizations_url":"https://api.github.com/users/sergeyksv/orgs","repos_url":"https://api.github.com/users/sergeyksv/repos","events_url":"https://api.github.com/users/sergeyksv/events{/privacy}","received_events_url":"https://api.github.com/users/sergeyksv/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2013-06-21T17:02:44Z","updated_at":"2015-01-22T05:55:24Z","closed_at":"2013-06-21T17:26:34Z","body":"   Hi, glad do found your project. Seems that near to the same time frame we did something very similar, but we focus on closer compatibility with MongoDB api and its features. One time we already choose wrong solution (it was Alfred DB)  and spent significant time to replace it with MongoDB. You can take a look: https://github.com/sergeyksv/tingodb\r\n  As we go in parallel (I didn't saw your db before we start) it will be interesting to compare performance and maybe add cross references in readme.md files. "},"comment":{"url":"https://api.github.com/repos/louischatriot/nedb/issues/comments/70975099","html_url":"https://github.com/louischatriot/nedb/issues/34#issuecomment-70975099","issue_url":"https://api.github.com/repos/louischatriot/nedb/issues/34","id":70975099,"user":{"login":"andyhu","id":203980,"avatar_url":"https://avatars.githubusercontent.com/u/203980?v=3","gravatar_id":"","url":"https://api.github.com/users/andyhu","html_url":"https://github.com/andyhu","followers_url":"https://api.github.com/users/andyhu/followers","following_url":"https://api.github.com/users/andyhu/following{/other_user}","gists_url":"https://api.github.com/users/andyhu/gists{/gist_id}","starred_url":"https://api.github.com/users/andyhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyhu/subscriptions","organizations_url":"https://api.github.com/users/andyhu/orgs","repos_url":"https://api.github.com/users/andyhu/repos","events_url":"https://api.github.com/users/andyhu/events{/privacy}","received_events_url":"https://api.github.com/users/andyhu/received_events","type":"User","site_admin":false},"created_at":"2015-01-22T05:55:24Z","updated_at":"2015-01-22T05:55:24Z","body":"Here is the benchmark:\r\n__Tingodb__\r\n```\r\n$ node find -n 1000\r\n----------------------------\r\nTest with 1000 documents\r\nDon't use an index\r\nUse a persistent datastore\r\n----------------------------\r\nFIND BENCH - Begin profiling\r\nFIND BENCH - Begin inserting 1000 docs - 1ms (total: 1ms)\r\n===== RESULT (insert) ===== 3831 ops/s\r\nFIND BENCH - Finished inserting 1000 docs - 262ms (total: 263ms)\r\nFIND BENCH - Finding 1000 documents - 1ms (total: 264ms)\r\n===== RESULT (find) ===== 13 ops/s\r\nFIND BENCH - Finished finding 1000 docs - 75s (total: 75.3s)\r\nFIND BENCH - Benchmark finished - 0ms (total: 75.3s)\r\n\r\n```\r\n\r\n__NeDB__\r\n```\r\n$ node find -n 1000\r\n----------------------------\r\nTest with 1000 documents\r\nDon't use an index\r\nUse a persistent datastore\r\n----------------------------\r\nFIND BENCH - Begin profiling\r\nFIND BENCH - Begin inserting 1000 docs - 1ms (total: 1ms)\r\n===== RESULT (insert) ===== 1901 ops/s\r\nFIND BENCH - Finished inserting 1000 docs - 527ms (total: 529ms)\r\nFIND BENCH - Finding 1000 documents - 1ms (total: 532ms)\r\n===== RESULT (find) ===== 471 ops/s\r\nFIND BENCH - Finished finding 1000 docs - 2.1s (total: 2.6s)\r\nFIND BENCH - Benchmark finished - 0ms (total: 2.6s)\r\n```\r\n\r\nIt seems like for this specific `find` test, NeDB is about 30x faster than TingoDB. I haven't tried with the default option `-n 10000` since TingoDB stuck for a few minutes.\r\n\r\nYou can find the benchmark code which I ported to TingoDB here: https://github.com/andyhu/tingodb/tree/benchmark/benchmarks"}}