1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
|
================================================================================
RQRCode Core - Memory Profiling Benchmark
================================================================================
Ruby: 3.3.4 (arm64-darwin24)
ARCH_BITS: 32
================================================================================
--- Single small QR (v1) ---
Total allocated: 0.10 MB
Total retained: 0.00 MB
Objects allocated: 1188
Objects retained: 0
Top 3 allocations by class:
Array: 0.06 MB
Range: 0.03 MB
Hash: 0.01 MB
--- Single medium QR (v5) ---
Total allocated: 0.29 MB
Total retained: 0.00 MB
Objects allocated: 3602
Objects retained: 0
Top 3 allocations by class:
Array: 0.19 MB
Range: 0.09 MB
RQRCodeCore::QRPolynomial: 0.01 MB
--- Single large QR (v24) ---
Total allocated: 2.92 MB
Total retained: 0.00 MB
Objects allocated: 32524
Objects retained: 0
Top 3 allocations by class:
Array: 1.91 MB
Range: 0.86 MB
RQRCodeCore::QRPolynomial: 0.10 MB
--- Batch: 100 small QR codes ---
Total allocated: 9.10 MB
Total retained: 0.00 MB
Objects allocated: 117500
Objects retained: 0
Top 3 allocations by class:
Array: 5.88 MB
Range: 2.93 MB
RQRCodeCore::QRPolynomial: 0.17 MB
--- Batch: 10 large QR codes ---
Total allocated: 29.19 MB
Total retained: 0.00 MB
Objects allocated: 325240
Objects retained: 0
Top 3 allocations by class:
Array: 19.14 MB
Range: 8.64 MB
RQRCodeCore::QRPolynomial: 0.95 MB
--- Create only ---
Total allocated: 9.10 MB
Total retained: 0.00 MB
Objects allocated: 117500
Objects retained: 0
Top 3 allocations by class:
Array: 5.88 MB
Range: 2.93 MB
RQRCodeCore::QRPolynomial: 0.17 MB
--- Create + render ---
Total allocated: 11.46 MB
Total retained: 0.00 MB
Objects allocated: 164100
Objects retained: 0
Top 3 allocations by class:
Array: 5.92 MB
Range: 2.93 MB
String: 2.34 MB
--- Numeric mode ---
Total allocated: 9.09 MB
Total retained: 0.00 MB
Objects allocated: 117701
Objects retained: 0
Top 3 allocations by class:
Array: 5.85 MB
Range: 2.92 MB
RQRCodeCore::QRPolynomial: 0.17 MB
--- Alphanumeric mode ---
Total allocated: 13.97 MB
Total retained: 0.00 MB
Objects allocated: 172700
Objects retained: 0
Top 3 allocations by class:
Array: 9.00 MB
Range: 4.48 MB
RQRCodeCore::QRPolynomial: 0.28 MB
--- Byte mode ---
Total allocated: 13.87 MB
Total retained: 0.00 MB
Objects allocated: 170500
Objects retained: 0
Top 3 allocations by class:
Array: 8.98 MB
Range: 4.49 MB
RQRCodeCore::QRPolynomial: 0.28 MB
--- Multi-segment encoding ---
Total allocated: 14.08 MB
Total retained: 0.00 MB
Objects allocated: 174200
Objects retained: 0
Top 3 allocations by class:
Array: 9.04 MB
Range: 4.49 MB
RQRCodeCore::QRPolynomial: 0.28 MB
================================================================================
Memory profiling complete!
Note: To test ARCH_BITS=32 impact, run:
RQRCODE_CORE_ARCH_BITS=32 ruby test/benchmark_memory.rb
================================================================================
|