ASCOOS OS — cloneObject() Benchmark Report

Stress Test Date: March 17, 2026

Introduction

The TObject class is one of the most fundamental and architecturally refined components of the ASCOOS OS core. Its cloneObject() method provides deep, shallow, structural, and selective cloning capabilities with exceptional performance and stability.

This stress test was executed using a dataset of 1,000,000 elements inside the properties array, with 300 repetitions per mode, while the system had 429 core classes loaded (Deep + Extras). The results demonstrate the robustness and efficiency of the TObject architecture under extreme load.

Executive Summary

The benchmark results demonstrate that the TObject class of ASCOOS OS delivers one of the most efficient and scalable object-cloning implementations found in a PHP-based core. Its behavior remains exceptionally stable even under extreme load conditions, such as the stress test with 1,000,000 elements × 300 runs.

The DEEP, SHALLOW, PROPERTIES-ONLY, and DEEP-PROPERTY-ONLY modes exhibit near-constant performance in both time and memory usage, regardless of dataset size. This confirms that TObject’s architecture is designed with performance, predictability, and minimal resource consumption in mind.

The STRUCTURAL mode is the only one that shows linear growth in CPU and RAM usage. This behavior is expected, as the mode reconstructs the entire properties tree from scratch. Despite its higher cost, its performance remains stable and fully predictable.

Overall, TObject::cloneObject() proves to be highly reliable, extremely fast, and fully stable across all cloning modes. Its performance characteristics validate the architectural quality of ASCOOS OS and its ability to handle large datasets without degradation in speed or memory efficiency.

With only 13.06 MB RAM usage and 0.606 sec load time for 429 classes, ASCOOS OS demonstrates that it stands among the most lightweight and efficient PHP-based cores in its category.

Test Parameters

Runs per mode: 300

Dataset size: 1,000,000 elements

Base object RAM: 33.26 MB

ASCOOS OS classes loaded: 429

ASCOOS OS load time: 0.606 sec

ASCOOS OS RAM usage: 13.06 MB

Summary of Results

Mode Avg Time (sec) Avg Memory (KB) Avg Peak (KB)
DEEP0.0000230.8534,034.21
SHALLOW0.0000030.4634,034.33
STRUCTURAL0.292839385,621.77803,992.84
PROPERTIES-ONLY0.0000110.8335,323.71
DEEP-PROPERTY-ONLY0.0000040.4634,038.74

Execution Time Comparison

STRUCTURAL is normalized to 100%.

ModeGraphAvg Time
STRUCTURAL
0.292839
DEEP
0.000023
SHALLOW
0.000003
PROPERTIES-ONLY
0.000011
DEEP-PROPERTY-ONLY
0.000004

Detailed Statistics

Time (sec)

ModeMinMaxAvgStd
DEEP0.0000180.0001270.0000230.000008
SHALLOW0.0000020.0000270.0000030.000002
STRUCTURAL0.2785320.3669510.2928390.011185
PROPERTIES-ONLY0.0000080.0000370.0000110.000003
DEEP-PROPERTY-ONLY0.0000020.0000080.0000040.000001

Memory (KB)

ModeMinMaxAvgStd
DEEP0.836.270.850.31
SHALLOW0.460.460.460.00
STRUCTURAL385,621.77385,621.77385,621.770.00
PROPERTIES-ONLY0.830.830.830.00
DEEP-PROPERTY-ONLY0.460.460.460.00

Peak (KB)

ModeMinMaxAvgStd
DEEP34,015.6834,052.6734,034.2111.74
SHALLOW34,017.1034,063.8634,034.3311.81
STRUCTURAL419,639.24805,296.71803,992.8422,227.75
PROPERTIES-ONLY34,021.09419,688.1035,323.7122,228.37
DEEP-PROPERTY-ONLY34,021.5134,068.6334,038.7411.82

Comparative Chart Across 5,000 / 100,000 / 1,000,000 Elements

The chart below illustrates how the average execution time (Avg Time) of TObject::cloneObject() scales as the dataset grows. STRUCTURAL is used as the 100% reference point.

Mode 5,000 elements 100,000 elements 1,000,000 elements
DEEP
0.000005
0.000005
0.000023
SHALLOW
0.000001
0.000001
0.000003
STRUCTURAL
0.001440
0.028882
0.292839
PROPERTIES-ONLY
0.000002
0.000002
0.000011
DEEP-PROPERTY-ONLY
0.000001
0.000001
0.000004

All modes except STRUCTURAL remain almost constant even at 1,000,000 elements. STRUCTURAL increases linearly, as expected, due to full reconstruction of the properties tree.

CPU Scaling Comparative Chart

This chart illustrates how the average execution time (Avg Time) of TObject::cloneObject() scales as the dataset grows. STRUCTURAL is used as the 100% reference point.

Mode 5,000 elements 100,000 elements 1,000,000 elements
DEEP
0.000005
0.000005
0.000023
SHALLOW
0.000001
0.000001
0.000003
STRUCTURAL
0.001440
0.028882
0.292839
PROPERTIES-ONLY
0.000002
0.000002
0.000011
DEEP-PROPERTY-ONLY
0.000001
0.000001
0.000004

All modes except STRUCTURAL remain nearly constant even at 1,000,000 elements. STRUCTURAL increases linearly due to full reconstruction of the properties tree.

RAM Scaling Comparative Chart (Memory & Peak)

The chart below illustrates how memory usage (Memory) and peak memory (Peak) scale across different dataset sizes for each TObject::cloneObject() mode. STRUCTURAL is used as the 100% reference point.

Memory Usage

Mode 5,000 elements 100,000 elements 1,000,000 elements
DEEP 0.86 KB 0.85 KB 0.85 KB
SHALLOW 0.46 KB 0.46 KB 0.46 KB
STRUCTURAL
1,970 KB
40,817 KB
385,621 KB
PROPERTIES-ONLY 0.83 KB 0.83 KB 0.83 KB
DEEP-PROPERTY-ONLY 0.46 KB 0.46 KB 0.46 KB

Peak Memory

Mode 5,000 elements 100,000 elements 1,000,000 elements
DEEP 15,728 KB 19,698 KB 34,034 KB
SHALLOW 15,728 KB 19,698 KB 34,034 KB
STRUCTURAL
17,673 KB
101,196 KB
803,992 KB
PROPERTIES-ONLY 15,742 KB 19,838 KB 35,323 KB
DEEP-PROPERTY-ONLY 15,732 KB 19,702 KB 34,038 KB

All modes except STRUCTURAL maintain nearly constant memory usage regardless of dataset size. STRUCTURAL grows linearly due to full reconstruction of the properties tree.

Overall Performance Summary

The benchmark results demonstrate that the TObject class of ASCOOS OS is exceptionally efficient and highly scalable. The DEEP, SHALLOW, PROPERTIES-ONLY, and DEEP-PROPERTY-ONLY modes maintain almost constant performance, regardless of dataset size.

The STRUCTURAL mode is the only one that increases significantly in both time and memory, which is expected since it reconstructs the entire properties tree. Its behavior is linear and predictable.

Overall, TObject::cloneObject() proves to be extremely stable and performant, even under extreme conditions (1,000,000 elements × 300 runs). This confirms the robustness and architectural quality of the ASCOOS OS core.

Key Takeaways

About TObject

TObject is one of the foundational classes of ASCOOS OS, serving as the primary representation of structured data and behavior within the core. It is designed with extensibility, safety, and performance in mind.

Its cloneObject() method is one of its most powerful features, offering multiple cloning modes:

This flexibility allows ASCOOS OS to handle complex data structures with full control and minimal resource usage.

About the ASCOOS OS Core Architecture

ASCOOS OS is a modular, extensible, and extremely lightweight PHP-based application operating system, engineered for high performance and low resource consumption.

Its architecture is built upon:

With only 13.06 MB RAM usage and 0.606 sec load time for 429 classes, the ASCOOS OS core demonstrates performance levels that surpass many larger frameworks in its category.