Skip to main content

LQFT Engine: Strict Native C-Core & Hardware Concurrency (v0.7.5 Stable)

Project description

Log-Quantum Fractal Tree (LQFT) 🚀

Python 3.12 C-Engine Concurrency Systems Architecture License

📌 Project Overview

The Log-Quantum Fractal Tree (LQFT) is a high-performance, scale-invariant data structure engine designed for massive data deduplication and persistent state management. It synthesizes Hash Array Mapped Trie (HAMT) routing with Merkle-DAG structural folding to provide deterministic $O(1)$ search latency and sub-linear $O(\Sigma)$ space complexity.

By offloading core associative logic to a native C-Extension, the LQFT completely bypasses the Python Global Interpreter Lock (GIL), providing true hardware concurrency and significant memory reduction for versioned, redundant, or patterned datasets.


🧠 Core Architecture (v0.7.5 Strict Native Release)

1. Strict C-Core Enforcement

The legacy pure-Python fallback heuristics have been entirely stripped out. The LQFT now operates strictly as a zero-overhead FFI wrapper directly communicating with the underlying unmanaged C memory heap.

2. True Hardware Concurrency & Strict GIL Bypass (New in v0.7.5)

The engine utilizes native OS-level read-write locks (SRWLOCK on Windows, pthread_rwlock_t on POSIX) combined with strict Py_BEGIN_ALLOW_THREADS boundaries.

  • Multi-Core Scaling: Multiple Python threads can read and write to the Merkle-DAG simultaneously across all physical CPU cores without Segmentation Faults.
  • Zero GIL Contention: The C-Engine entirely decouples from the Python interpreter during execution, ensuring the GIL never blocks concurrent array traversals.

3. Scale-Invariant Time Complexity: $O(1)$

The LQFT utilizes a fixed 64-bit hash space partitioned into 13 levels.

  • Deterministic Latency: Every search or insertion requires exactly 13 pointer hops.
  • Scale-Invariance: Performance remains constant whether the dataset contains 10^3 or 10^9 items.

4. Entropy-Based Space Complexity: $O(\Sigma)$

Nodes are identified by the cryptographic hash of their contents and child pointers (Merkle-DAG).

  • Structural Folding: Identical sub-trees are shared physically in memory across different branches or versions.

🚀 Performance Benchmarks

Environment: Python 3.12 | GCC -O3 | MSYS2/MinGW64 | 16-Thread Concurrency

Metric Result
Search Latency (p50) ~500 ns
Concurrent Throughput ~1.8 Million ops/sec (True Multi-Core)
Space Efficiency Up to 1,500x reduction in versioned graph simulations
Stability 100% Memory Safe under massive multi-threaded turnover

🛠️ Getting Started

Installation

The engine requires a C compiler (GCC/MinGW or MSVC) to build the native extension.

# Clone the repository
git clone [https://github.com/ParjadM/Log-Quantum-Fractal-Tree-LQFT-.git](https://github.com/ParjadM/Log-Quantum-Fractal-Tree-LQFT-.git)
cd Log-Quantum-Fractal-Tree-LQFT-

# Build the native C-extension
python setup.py build_ext --inplace

Basic Usage

The LQFT provides a Pythonic interface to its high-performance C-backend.

from lqft_engine import LQFT
import threading

# Initialize the Strict Native Engine
db = LQFT()

# The C-Engine releases the GIL, allowing true multi-threading
def worker(thread_id):
    for i in range(10000):
        db.insert(f"thread_{thread_id}_key_{i}", "enterprise_payload")

threads = [threading.Thread(target=worker, args=(t,)) for t in range(16)]
for t in threads: t.start()
for t in threads: t.join()

# --- Native Disk Persistence ---
db.save_to_disk("production_state.bin")
db.clear()
db.load_from_disk("production_state.bin")

⚖️ License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lqft_python_engine-0.7.5.tar.gz (8.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

lqft_python_engine-0.7.5-cp312-cp312-win_amd64.whl (16.3 kB view details)

Uploaded CPython 3.12Windows x86-64

lqft_python_engine-0.7.5-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

lqft_python_engine-0.7.5-cp312-cp312-macosx_11_0_arm64.whl (13.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

lqft_python_engine-0.7.5-cp312-cp312-macosx_10_9_x86_64.whl (13.4 kB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

lqft_python_engine-0.7.5-cp311-cp311-win_amd64.whl (16.3 kB view details)

Uploaded CPython 3.11Windows x86-64

lqft_python_engine-0.7.5-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

lqft_python_engine-0.7.5-cp311-cp311-macosx_11_0_arm64.whl (13.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

lqft_python_engine-0.7.5-cp311-cp311-macosx_10_9_x86_64.whl (13.4 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

lqft_python_engine-0.7.5-cp310-cp310-win_amd64.whl (16.3 kB view details)

Uploaded CPython 3.10Windows x86-64

lqft_python_engine-0.7.5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

lqft_python_engine-0.7.5-cp310-cp310-macosx_11_0_arm64.whl (13.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

lqft_python_engine-0.7.5-cp310-cp310-macosx_10_9_x86_64.whl (13.4 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

lqft_python_engine-0.7.5-cp39-cp39-win_amd64.whl (16.3 kB view details)

Uploaded CPython 3.9Windows x86-64

lqft_python_engine-0.7.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.5 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

lqft_python_engine-0.7.5-cp39-cp39-macosx_11_0_arm64.whl (13.6 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

lqft_python_engine-0.7.5-cp39-cp39-macosx_10_9_x86_64.whl (13.4 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

lqft_python_engine-0.7.5-cp38-cp38-win_amd64.whl (16.2 kB view details)

Uploaded CPython 3.8Windows x86-64

lqft_python_engine-0.7.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (29.4 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

lqft_python_engine-0.7.5-cp38-cp38-macosx_11_0_arm64.whl (13.9 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

lqft_python_engine-0.7.5-cp38-cp38-macosx_10_9_x86_64.whl (13.6 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

File details

Details for the file lqft_python_engine-0.7.5.tar.gz.

File metadata

  • Download URL: lqft_python_engine-0.7.5.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lqft_python_engine-0.7.5.tar.gz
Algorithm Hash digest
SHA256 87a93cd57ae51dfbffbb7f2d78c9d97b044772e49ec597817e0a930a9d648043
MD5 a4e5f69b587a176f8d83fd3d1c2ac396
BLAKE2b-256 876d9aaa679c5cae05d5435ac9cde2a95d33a5b369500f73c6f58ff244d3ad10

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.5-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.7.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0e358f325c651ec2db46d2d97f75e8a2c2044ad7e68127e2ee3b0bf27dd3a19e
MD5 d8d1497feabe70c35aa2978f153ef495
BLAKE2b-256 dfa1037da8b95fcdb4bb95a5af70dea3b7f6e1a517f1431c6cc017c773ee443d

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.5-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.7.5-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 511ca3ab8e71d6affa98b27ee24707f30d1ec5ef0c460e117cd440a78599d81e
MD5 980f754514f870913d9981f06f014b53
BLAKE2b-256 caeb7e41144398abb9a103c73c5b152607fb8670d7ad1d841d08423f83c03bfa

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.5-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.7.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 91f2db1fa9367c3603e7e589dc77b324f90f0408b6321baf82cbe2887ad5fc45
MD5 290f3ba7837abf1170c74cd14d1bc11b
BLAKE2b-256 4e89e3b99298b544e5cd3f5e1d947a4a5d445ed24350c68599c271b2996bc9c6

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.5-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.7.5-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2f2ab45d5f36b1b4133433abffd5b040e241e99d359eb76fcc32db6ff15992c6
MD5 4df2e58bb284c3b6504dccb6bb3a183d
BLAKE2b-256 37aa3a60ccdebe6fe28d8651e33989278e0f0491411404e4a92074fa8ea69c56

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.5-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.7.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 111b2594835ec9fdc9aef7ba8c8496ee380a35f2a1a37300ae489aaeb3f28b45
MD5 8998d6b12324cf8bf89b6494b1dd1136
BLAKE2b-256 30231d98e8f8368d37da91a406645172ae37731df9c196aa8f92b325691d8249

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.5-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.7.5-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3a5aa84fbf585797d6772f0f7aee94ff39c44320d6a248ea20c3e357a8f03c69
MD5 550cfa60aa3ea8a3aa07976bc1df6b7b
BLAKE2b-256 c8fcd5ff204fe40a97050c8ea6f955382bf5d7fbd817711a06e5e1d6ee9e8955

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.5-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.7.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 25ad9cae643d5349fb148befcdc097ba514c0b86e8533480857a05e39a1422c8
MD5 ae368c6130acd54a3e1f56778da03749
BLAKE2b-256 b94e5dfe3d68469e845cb5578eb09b8f2c06b65c6058f6593d8abc83dae9f708

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.5-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.7.5-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a3d9f2b41f7abe75b423afea9d57998a78a6b1632a074c86e35d12ba1e4ec64a
MD5 1aa39a242eb8e8a6a84351a752eae016
BLAKE2b-256 72c751ea516dec14e276eefe496c468a6ffadad4b14be270fc0d81717e19ee96

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.5-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.7.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3ebb1bd084d8e5e4cb4dc68bdfe58a71a371f06c29b59043a106d8207c524ef4
MD5 9626768245aadae780484f9c8822b1b5
BLAKE2b-256 6805bf3b6cd04e55aeaee4aa5b66c5f9cfd468784e198dc5e3d6fe2ac57c8708

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.7.5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6e1412c1e6e834c8aa4096aeaf14e0011f6cd735f66a786292287e692ccb1531
MD5 5d451606fa855f1115c9ef4d52ffcb1f
BLAKE2b-256 751faf9326216d8cc254452a131ee1bb9f2b909fe88f2a3990f62a2703b1b618

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.5-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.7.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 812cdd00776c9fcb59905625ece39ec589a44cdbef7c784ec07d5acddb085e9f
MD5 3bcb7e00389730e09e204508a8be2540
BLAKE2b-256 4671b0b56f6f77d9cf3b7eacac6b46c9897fea05038a9f5e5dbad45b1f286586

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.5-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.7.5-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4d48eacbd20df965a7da0922a6ffb700b9de173df18827e4f1be657a97da69f5
MD5 c5bd6b4fbcc6472a5af9bbb23e49ec7d
BLAKE2b-256 6420e28fd8491af2fc6e6052f0ce1f29f33ca9d417d68b9f807ab2dfb414603d

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.5-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.7.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a53ac3b1dd82e97346b8b162d17c6599df697f5f642e12717191cf8d4b13b19f
MD5 a8c9f3433cb4a7a07b17014c77c4aebb
BLAKE2b-256 099462e198f721d4dcef6e3c5d5320e0bb80a0ecbcad4518f6fadd0567a03ae4

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.7.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6c83c52f560391d07418b58e871c4fd0c331d6659acd2c61d4a88194988a478a
MD5 1d9f3c79089a011bad2496e869734fd6
BLAKE2b-256 1ef775b4fdf7aa3defe45823a46e1f89b04571ba7152b8cdf81c00915437be3c

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.5-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.7.5-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d45af99e9da44075415c794250f5a7a6510f42ae57f766bf0a44b159d36b0ace
MD5 722810e6f7d423f5055676bad0a2193b
BLAKE2b-256 8b41c6a12baf222733ab22ac97a87a90ef9b18a0d6b964f58007bfa43baf3a3e

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.5-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.7.5-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0f4a7104e7023dd52275ad06c7e426e85a5818097c2b728c9f2fc2c5597f5109
MD5 3e8756b9d2bbbd2a08048628a7463812
BLAKE2b-256 adbe016124cc8139d42cf8a46a98105af528b812a8d36e4aa6800cee9a59c925

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.5-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.7.5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 81fca2e0704fb37fdb1cb5763f75074ab423019e19997ddec15b9315216f21cd
MD5 94ebfe7cc6d98ccc670e35808687c9b5
BLAKE2b-256 a90cafbe6c09af313258c8b085b4a37a22c1a10c6a40f07ffdc339136488935e

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.7.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 30f979aa870dda1a52e2df511733cd6d7991719c174868cfd898280121acd59a
MD5 3a8b71b5fcb91c8115efc0ba5bdd58eb
BLAKE2b-256 22502433eb72483a2e0e137fd117196e6ec1d2cfb695e0b7d1339967be9f618c

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.5-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.7.5-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a3995cc5e837c24acf3642bf9edc2948d6dc1a7f750310fdfa5741c4afdc256d
MD5 0f7a7c744ad17068f69dbb80026c9dbc
BLAKE2b-256 a9d07bf56d66d74a6773b265b2d67864c5af686ed0854b3685c341471b317cfa

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.7.5-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for lqft_python_engine-0.7.5-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ef6ef6e449dff23a5abb735ef0db70da7d8d630b70bcd748c86f9d429f42f899
MD5 1fd64481613474f4b8767a8695758a97
BLAKE2b-256 3bbd6ca8f3bbcb2c271b29c9695aa4d818f19c6a2aee29f185ffd4e393aa9c9d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page