Skip to main content

LQFT Engine: Custom Arena Allocator & O(1) Fast-Path (v0.9.1 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.1 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.0)

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.1.tar.gz (10.0 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.1-cp312-cp312-win_amd64.whl (15.7 kB view details)

Uploaded CPython 3.12Windows x86-64

lqft_python_engine-0.9.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.8 kB view details)

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

lqft_python_engine-0.9.1-cp312-cp312-macosx_11_0_arm64.whl (13.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

lqft_python_engine-0.9.1-cp312-cp312-macosx_10_9_x86_64.whl (12.8 kB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

lqft_python_engine-0.9.1-cp311-cp311-win_amd64.whl (15.7 kB view details)

Uploaded CPython 3.11Windows x86-64

lqft_python_engine-0.9.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (35.5 kB view details)

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

lqft_python_engine-0.9.1-cp311-cp311-macosx_11_0_arm64.whl (13.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

lqft_python_engine-0.9.1-cp311-cp311-macosx_10_9_x86_64.whl (12.8 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

lqft_python_engine-0.9.1-cp310-cp310-win_amd64.whl (15.7 kB view details)

Uploaded CPython 3.10Windows x86-64

lqft_python_engine-0.9.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.4 kB view details)

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

lqft_python_engine-0.9.1-cp310-cp310-macosx_11_0_arm64.whl (13.2 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

lqft_python_engine-0.9.1-cp310-cp310-macosx_10_9_x86_64.whl (12.8 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: lqft_python_engine-0.9.1.tar.gz
  • Upload date:
  • Size: 10.0 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.1.tar.gz
Algorithm Hash digest
SHA256 713ad3c3739e592f97c1ad1a0e592b0c55d27753ca7871e522ea8719152fc94e
MD5 70218591f832e146008043993da5da13
BLAKE2b-256 a96e76960a5bdbadb21b3c7c32d5e4b1524a77814eec9125f0d640beedd31457

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.9.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c148366592f713e17bab645ac4689236bf3ca561a46fe7e1904d03d2d1a370e5
MD5 56af34e766f6bde876bf5b486fef39f5
BLAKE2b-256 df8879b38fa4cabe1f28035c89a7e6c344904fb421db6dacdf83f239a0f6e14b

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.9.1-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.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7b7f2013dedc78831987464d2c7db1eb181e3c837878815cbb4863d42dd25d06
MD5 663fec10bfcfe019ff8ffa81c9189b7e
BLAKE2b-256 af4f3ba95c0fcdf868c8c4713b02c4dd2e7f3b02cc1fe900b8ffcfdedce21a09

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.9.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6f91bc1ef85f91864852336e7d01d3169d4928878d2f5482a760a5bcdb1e58ee
MD5 0d761b9576a151f37cea3664c1e32044
BLAKE2b-256 72532de1fd0547f5b4bf2975fc34a2575ce507b02f715a22b363784bc86e3674

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.9.1-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ebce4b098653b6a6448942bebea27ca43050a72b0bffbc18ce29ca29f22d52e6
MD5 073eb998808360ca855d557eee0909aa
BLAKE2b-256 6401172abc3766867b1303f4cebf79e243576b3ad61291e107a176e56b991fd1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.9.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 242adc92edbaa128353c6dd7eccf72b845506f535b9b907143ee078fbf2cfe83
MD5 9abd7234a36a3f9559e9282617e93dc4
BLAKE2b-256 20d7bef11e395103f2eaa7be4ea4ae9841513e5eaac9e9cd20a63ede224442a2

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.9.1-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.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 00335aa4c54db8e3ffa9f115cd7219e57aa5d9ed295c80426391bdb31265ec43
MD5 8bac78603a9767455cdb169d91945e9c
BLAKE2b-256 8531b5518d26bd88c9aa657fb6da9f09710b62ec9ecf5915c940c089daf8948f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.9.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e4308f243ea422b47e8f7927985f080b6a5bcefb258649c96c717c250df75b96
MD5 3493fb22bb2b23da4c93f4316115397a
BLAKE2b-256 8cb003c6e1c70e5d2ac84bf6a52ef40724b7bb36365726398379b3464ca55f3d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.9.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 05dd46e573de5fac2f135e9405745663d1bfa3a11d93b176f56320570c72d0bf
MD5 faf9e8f18ea937efacb956f04b68d185
BLAKE2b-256 569ff16cea7b1ae20d39cbb6f0dfd65a65287d096293ff5bc905b6d3177a8d7f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.9.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b56e085d38d11f58abd54e09e523a7b9ff5888a8ae0e366fc8c1d602822ab0dd
MD5 fe334f60f2ced261359a54a73e421e64
BLAKE2b-256 ea67e478c3f0d34d33aee0a5b6642098885402d266ea0348dffe39285d2769c1

See more details on using hashes here.

File details

Details for the file lqft_python_engine-0.9.1-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.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3601a73ab76b7425fbb0204b88a62c1a5b0181d08a3fe2bd4dc9189179dd9be6
MD5 217a45bfdda923cd17b4c2666fe81a93
BLAKE2b-256 3868e9a03fdaa2f5492edb2eea77482a9c6017f9ec85c912370e45199db8095b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.9.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 92a0612b110965061681369bfb2179cb6b90c19863b99182e411b31e5cda50f3
MD5 7f9802bcb654dc14c7e194fef1a3e2ec
BLAKE2b-256 c7cf1428a95580fd536018e131fa6da103bf3a797da4e12d92d58dc6a7613cc3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lqft_python_engine-0.9.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e7ec94e0bc7a3b35a9fa779b0e7fe5350b2da39ebe84e0754d31b51cf62f1030
MD5 b3e83eca74be67a4d51e8f63c1868cde
BLAKE2b-256 89e0b691df5ad199e34f77f2d6963e3d8f6eccd8214b0a082ec4701049819894

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