Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

84 add un q lite as backend option #85

Merged
merged 10 commits into from
Apr 5, 2022

Conversation

sebastianconcept
Copy link
Owner

@sebastianconcept sebastianconcept commented Apr 2, 2022

All test green.

There are a couple of features that is not clear if can be implemented:

  1. conditional count
  2. conditional finds

So these unit tests were removed at this time.

Hopefully it can be implemented later but if not, with the current features this promises to be a good backend for using as cache:

Benchmarking Mapless on UnQLite... (using BSON for serialization)

Saved 1000 instances of MaplessDummyPerson in: 413 ms (~2422 saves per second)
Read 1000 instances of MaplessDummyPerson in: 25 ms (~40379 reads per second)
Saved 10000 instances of MaplessDummyPerson in: 1288 ms (~7762 saves per second)
Read 10000 instances of MaplessDummyPerson in: 213 ms (~46920 reads per second)
Saved 1000 instances of MaplessDummyPerson and MaplessDummyUser in: 179 ms (~5593 saves per second)
Read 1000 instances of MaplessDummyPerson and MaplessDummyUser in: 34 ms (~29544 reads per second)
Saved 10000 instances of MaplessDummyPerson and MaplessDummyUser in: 1642 ms (~6091 saves per second)
Read 10000 instances of MaplessDummyPerson and MaplessDummyUser in: 356 ms (~28071 reads per second)

Benchmarking Mapless on UnQLite... (using MessagePacked for serialization)

Saved 1000 instances of MaplessDummyPerson in: 61 ms (~16278 saves per second)
Read 1000 instances of MaplessDummyPerson in: 46 ms (~21533 reads per second)
Saved 10000 instances of MaplessDummyPerson in: 612 ms (~16342 saves per second)
Read 10000 instances of MaplessDummyPerson in: 468 ms (~21386 reads per second)
Saved 1000 instances of MaplessDummyPerson and MaplessDummyUser in: 144 ms (~6945 saves per second)
Read 1000 instances of MaplessDummyPerson and MaplessDummyUser in: 72 ms (~13856 reads per second)
Saved 10000 instances of MaplessDummyPerson and MaplessDummyUser in: 1530 ms (~6536 saves per second)
Read 10000 instances of MaplessDummyPerson and MaplessDummyUser in: 744 ms (~13443 reads per second)```

@sebastianconcept
Copy link
Owner Author

sebastianconcept commented Apr 3, 2022

I've added testSeekGreaterThan and testSeekGreaterThan using MaplessUnQLiteCursor>>fromCurrentDoEach: and MaplessUnQLiteCursor>>fromCurrentReverseDoEach: that for some reason needs:

  1. help to detect when it should stop (first or last key)
  2. reverse enumeration (due to the key as byte array sorting order in unqlite)

Copy link
Collaborator

@eMaringolo eMaringolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

@sebastianconcept sebastianconcept merged commit fdf3e86 into develop Apr 5, 2022
@sebastianconcept sebastianconcept deleted the 84-Add-UnQLite-as-backend-option branch April 5, 2022 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants