Willtech / Prime

An attempt to optimise the search for prime.
MIT License
1 stars 0 forks source link

Convert to LevelDB #4

Open Willtech opened 4 months ago

Willtech commented 4 months ago

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:

Willtech commented 4 months ago

LevelDB (30/04/2024) https://github.com/google/leveldb

plyvel 1.5.1 https://pypi.org/project/plyvel/