Skip to content

Convert to LevelDB #4

@Willtech

Description

@Willtech

Looking at the use of a tuple to store the computed Prime and to load them from storage, it seems apparent that the program operation would benefit through increased speed from the use of LevelDB. The use of a tuple is faster than a list however, as the size of the tuple grows past 10,000 Prime the speed slows from 6 seconds to many days for computing 10,000,000 Prime. LevelDB allows for lookup and storage in memory of only the relevant Prime needed for computation an optimisation designed to increase the speed average of searching for more Prime.

LevelDB Features:

  • Key-Value Store: Data is stored as key-value pairs, where both keys and values are arbitrary byte arrays.
  • Ordered Data: The data is stored sorted by key, which allows for efficient range queries.
  • Atomic Batches: Multiple changes can be made in one atomic batch, ensuring data integrity.
  • Compression: Supports compression of the data via Google's Snappy compression library, reducing storage space. (although we should not use it)
  • Simple API: Offers basic operations like Get, Put, and Delete, making it easy to use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions