Skip to main content

LQFT Engine: 1.3M+ Ops/sec Merkle Forest & Hardware Spinlocks (v0.9.5 Stable)

Project description

Log-Quantum Fractal Tree (LQFT) 🚀

Python 3.12 C-Engine Memory Arena Hardware 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.9.4 Multi-Language Core Prep)

1. Custom Memory Arena (Slab Allocator)

Standard C malloc() introduces significant OS metadata overhead (up to 16 bytes per allocation). In v0.9.0, the LQFT utilizes a Custom Slab Allocator. The engine requests memory in 16KB "Arena Chunks" and performs O(1) bump-allocation internally, crushing the memory footprint down to ~104 bytes per node.

2. Intrinsic Free-List & ARC

When a branch is overwritten, the engine natively reclaims memory using an intrinsic linked-list. "Dead" nodes repurpose their own internal pointers to form an infinite recycle bin, avoiding expensive calls to the Operating System's free() method.

3. O(1) Cryptographic Fast-Path

Branch hash recalculation during Deletion and Updates utilizes mathematical XOR inverses (Parent ^ (Old_Child * Prime) ^ (New_Child * Prime)). This eliminates the standard 32-way branch loop, providing sub-microsecond structural folding.


🚀 Silicon Performance Report (v0.9.2)

Environment: Python 3.12 | GCC -O3 | MinGW64 | 16-Core Parallel Architecture

Metric Result
Raw Memory Density ~104.6 bytes per node (Eliminated 288-byte bloat)
Search Latency (p50) ~500 ns (Deterministic 13-hop limit)
Raw Write Speed 313,433 ops/sec (Zero-Copy Buffer Protocol)
Multi-Thread Scaling Optimistic Concurrency (Read-Copy-Update)

🛠️ Getting Started

Installation

# 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

High-Speed Usage (Zero-Copy)

import lqft_c_engine
import array

# Prepare raw 64-bit buffer
raw_buffer = array.array('Q', [0x1, 0x2, 0x3])
lqft_c_engine.insert_batch_raw(bytes(raw_buffer), "enterprise_payload")

# Sub-microsecond search
result = lqft_c_engine.search(0x1)
print(result) # "enterprise_payload"

# Safe memory arena reclamation
lqft_c_engine.free_all()

⚖️ License

MIT License - Parjad Minooei (2026).

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.9.7.tar.gz (10.2 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.9.7-cp312-cp312-win_amd64.whl (17.4 kB view details)

Uploaded CPython 3.12Windows x86-64

lqft_python_engine-0.9.7-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (38.8 kB view details)

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

lqft_python_engine-0.9.7-cp312-cp312-macosx_11_0_arm64.whl (14.0 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

lqft_python_engine-0.9.7-cp312-cp312-macosx_10_9_x86_64.whl (13.5 kB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

lqft_python_engine-0.9.7-cp311-cp311-win_amd64.whl (17.5 kB view details)

Uploaded CPython 3.11Windows x86-64

lqft_python_engine-0.9.7-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (39.2 kB view details)

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

lqft_python_engine-0.9.7-cp311-cp311-macosx_11_0_arm64.whl (14.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

lqft_python_engine-0.9.7-cp311-cp311-macosx_10_9_x86_64.whl (13.5 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

lqft_python_engine-0.9.7-cp310-cp310-win_amd64.whl (17.5 kB view details)

Uploaded CPython 3.10Windows x86-64

lqft_python_engine-0.9.7-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (37.9 kB view details)

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

lqft_python_engine-0.9.7-cp310-cp310-macosx_11_0_arm64.whl (14.1 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

lqft_python_engine-0.9.7-cp310-cp310-macosx_10_9_x86_64.whl (13.5 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: lqft_python_engine-0.9.7.tar.gz
  • Upload date:
  • Size: 10.2 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.9.7.tar.gz
Algorithm Hash digest
SHA256 7a1f731e4d3c7e8b52a929282743e864c3f0581f8127811149340917040a4207
MD5 18ae5a347c738b582e69446328782490
BLAKE2b-256 841fc1b80b17d9ffc144f559fab640516f476c5aa3d5ccceddc4d1be40e44518

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.9.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ef6a264da4c8a947a0663d916497991c4db7377447e9e7d2686d632368479122
MD5 2cc99538571583ab55e79ac01f4c9f16
BLAKE2b-256 a81054a36ea27aaadf566f6ce73b34941669eaa22eda1233b2dc0ef41d40e73a

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.9.7-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.9.7-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 08a371100c89ef405591a69630613c507da0c7bafafbc1876467b113ae770a2d
MD5 22348927d4d9963ef75750492bcd7767
BLAKE2b-256 2678cec9bfe58ce68a34b30063f4c6f8b16288443ab1be1f499bac5de389c5c6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.9.7-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4a90d19065da10b1a097ba14efc1297936295e7101a2deec3964fd0ade519316
MD5 cc11fadf881d88acd774a1894d48fc54
BLAKE2b-256 d1e65b38c056599657d9607ec5d45db77e3e3a307ff13627cb95ef4f9eef2c28

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.9.7-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 968e4e4c610b852bcad4afdd5da698495480f4270cccd3cdc6c0d5f2ff8b75d0
MD5 28617787f2973b2d0157be7a9a54b80d
BLAKE2b-256 dd9fc22fbd8f83047c138e03451c363fae33ab3076ce655d765a0cefca2e93ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.9.7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 10068cf91fea7fbce6854388aea181e391b8cd51f4e7cc010317a23ef667640e
MD5 8d0a20811027c0a53082f496c69486a2
BLAKE2b-256 c76ee0478a0eafbf1cb7a2527e57ea19ebc7d0780069de61d2695caf07cffe63

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.9.7-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.9.7-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 663de8d9411ea0e276ccb5e23562aaeab8bc15f76ec8eef3eeb97d43ad2ffa4a
MD5 4fad1a273d9636e83666cfd494627851
BLAKE2b-256 6df1c678437ca8c04c65a66cda997c18877c3d279329a2cf4f1277366d735ea5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.9.7-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 022ede2d5c949b111b9cca56f690a0fdceff3dd952b445f6f0037f1ab5a79b0a
MD5 f795e9d10c861bbd4058741e39abd6ec
BLAKE2b-256 5027d452c2e6e114c94e374f59a650d99066c666512a39625e7d389236034f74

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.9.7-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c99f5e3bcfb445a30db42c8b7cbe54a3265b524cc487bdf52f55aacdae11a595
MD5 d918682c9d3c1ac1643b49623d64460e
BLAKE2b-256 8bd28a58856b2de4ff782894ada93fe58309dcce10022b0b75f5ad1e3d6b4758

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.9.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e7c214c209f920eeef9f93e1833cf1d403436b5f91336cd07331e0014996126f
MD5 5109ccb5080b5f3a4b83840d37262a87
BLAKE2b-256 812564761b7cad072aa073df20b26ca745243940dd9618c21a7933777412649b

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.9.7-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.9.7-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ef1aeecce5ad89314a7542c9ebc1cc120300d9136206232441739bb3baba9b2d
MD5 2cd4c169f05e7f0fc0b674c5e9615823
BLAKE2b-256 90a554120eb9e9a197aed816e5bebf24c44c0023431915fcfed6aee0c4d85a50

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.9.7-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 893b4cb881435ee2e429f542178149de28510b3d3f85dd14f060659e56276c82
MD5 d4bd05f2f21132ded3dee1495a31f121
BLAKE2b-256 8679900051a6778d34230e7f10bb51750baa25817f50d57b08e2fdc503655b73

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.9.7-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 150aeba7efedcabcd7fdcd7cc2ab5c83da9855af2cdcfe342541de1f41854b43
MD5 cfbc23d2a7dc949da09f7ff244ce5fa2
BLAKE2b-256 1e090e9ccfb133f7ceacfb37b2eba616003d664f83338607295ea6ecf463c10e

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