203 lines
12 KiB
XML
203 lines
12 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||
<!--
|
||
- StarForth — Steady-State Virtual Machine Runtime
|
||
-
|
||
- Copyright (c) 2023–2025 Robert A. James
|
||
- All rights reserved.
|
||
-
|
||
- This file is part of the StarForth project.
|
||
-
|
||
- Licensed under the StarForth License, Version 1.0 (the "License");
|
||
- you may not use this file except in compliance with the License.
|
||
-
|
||
- You may obtain a copy of the License at:
|
||
- https://github.com/star.4th@proton.me/StarForth/LICENSE.txt
|
||
-
|
||
- This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||
- express or implied, including but not limited to the warranties of
|
||
- merchantability, fitness for a particular purpose, and noninfringement.
|
||
-
|
||
- See the License for the specific language governing permissions and
|
||
- limitations under the License.
|
||
-
|
||
- StarForth — Steady-State Virtual Machine Runtime
|
||
- Copyright (c) 2023–2025 Robert A. James
|
||
- All rights reserved.
|
||
-
|
||
- This file is part of the StarForth project.
|
||
-
|
||
- Licensed under the StarForth License, Version 1.0 (the "License");
|
||
- you may not use this file except in compliance with the License.
|
||
-
|
||
- You may obtain a copy of the License at:
|
||
- https://github.com/star.4th@proton.me/StarForth/LICENSE.txt
|
||
-
|
||
- This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||
- express or implied, including but not limited to the warranties of
|
||
- merchantability, fitness for a particular purpose, and noninfringement.
|
||
-
|
||
- See the License for the specific language governing permissions and
|
||
- limitations under the License.
|
||
-
|
||
-->
|
||
|
||
<svg width="960" height="540" viewBox="0 0 960 540" xmlns="http://www.w3.org/2000/svg">
|
||
<!-- Title (outside boundary) -->
|
||
<text x="480" y="30" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="16" font-weight="bold" text-anchor="middle">
|
||
Figure 7: Performance Comparison (Locked vs Escaped Regimes)
|
||
</text>
|
||
|
||
<!-- Main plot area -->
|
||
<g transform="translate(100, 70)">
|
||
<!-- Axes -->
|
||
<line x1="0" y1="400" x2="800" y2="400" stroke="black" stroke-width="1.25" />
|
||
<line x1="0" y1="0" x2="0" y2="400" stroke="black" stroke-width="1.25" />
|
||
|
||
<!-- X-axis label -->
|
||
<text x="400" y="450" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="14" text-anchor="middle">
|
||
Window Size (bytes)
|
||
</text>
|
||
|
||
<!-- Y-axis label -->
|
||
<text x="-200" y="-35" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="14" text-anchor="middle" transform="rotate(-90)">
|
||
Performance (ms/word)
|
||
</text>
|
||
|
||
<!-- X-axis tick marks and labels -->
|
||
<line x1="150" y1="400" x2="150" y2="410" stroke="black" stroke-width="1.25" />
|
||
<text x="150" y="430" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="11" text-anchor="middle">6144B</text>
|
||
|
||
<line x1="350" y1="400" x2="350" y2="410" stroke="black" stroke-width="1.25" />
|
||
<text x="350" y="430" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="11" text-anchor="middle">8192B</text>
|
||
|
||
<line x1="550" y1="400" x2="550" y2="410" stroke="black" stroke-width="1.25" />
|
||
<text x="550" y="430" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="11" text-anchor="middle">16384B</text>
|
||
|
||
<line x1="750" y1="400" x2="750" y2="410" stroke="black" stroke-width="1.25" />
|
||
<text x="750" y="430" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="11" text-anchor="middle">32768B</text>
|
||
|
||
<!-- Y-axis tick marks and labels (30-60 ms) -->
|
||
<line x1="-10" y1="400" x2="0" y2="400" stroke="black" stroke-width="1.25" />
|
||
<text x="-15" y="405" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="11" text-anchor="end">30</text>
|
||
|
||
<line x1="-10" y1="333" x2="0" y2="333" stroke="black" stroke-width="1.25" />
|
||
<text x="-15" y="338" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="11" text-anchor="end">35</text>
|
||
|
||
<line x1="-10" y1="267" x2="0" y2="267" stroke="black" stroke-width="1.25" />
|
||
<text x="-15" y="272" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="11" text-anchor="end">40</text>
|
||
|
||
<line x1="-10" y1="200" x2="0" y2="200" stroke="black" stroke-width="1.25" />
|
||
<text x="-15" y="205" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="11" text-anchor="end">45</text>
|
||
|
||
<line x1="-10" y1="133" x2="0" y2="133" stroke="black" stroke-width="1.25" />
|
||
<text x="-15" y="138" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="11" text-anchor="end">50</text>
|
||
|
||
<line x1="-10" y1="67" x2="0" y2="67" stroke="black" stroke-width="1.25" />
|
||
<text x="-15" y="72" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="11" text-anchor="end">55</text>
|
||
|
||
<line x1="-10" y1="0" x2="0" y2="0" stroke="black" stroke-width="1.25" />
|
||
<text x="-15" y="5" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="11" text-anchor="end">60</text>
|
||
|
||
<!-- Baseline reference line -->
|
||
<line x1="0" y1="333" x2="800" y2="333" stroke="gray" stroke-width="1.25" stroke-dasharray="3,3" />
|
||
<text x="700" y="328" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="9" fill="gray">Baseline (35ms)</text>
|
||
|
||
<!-- Box plots for each window size -->
|
||
|
||
<!-- 6144B: Locked (slower) vs Escaped (slower) - both have cache penalty -->
|
||
<!-- Locked: 60.3ms (median) -->
|
||
<rect x="90" y="10" width="50" height="60" fill="green" fill-opacity="0.3" stroke="green" stroke-width="1.5" />
|
||
<line x1="90" y1="40" x2="140" y2="40" stroke="green" stroke-width="2" />
|
||
<text x="115" y="95" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="10" text-anchor="middle" font-weight="bold" fill="green">Locked</text>
|
||
<text x="115" y="108" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="9" text-anchor="middle" fill="green">60.3ms</text>
|
||
|
||
<!-- Escaped: 57.3ms (median) - 5% slower -->
|
||
<rect x="160" y="33" width="50" height="55" fill="red" fill-opacity="0.3" stroke="red" stroke-width="1.5" />
|
||
<line x1="160" y1="56" x2="210" y2="56" stroke="red" stroke-width="2" />
|
||
<text x="185" y="95" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="10" text-anchor="middle" font-weight="bold" fill="red">Escaped</text>
|
||
<text x="185" y="108" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="9" text-anchor="middle" fill="red">57.3ms</text>
|
||
|
||
<!-- Comparison arrow -->
|
||
<path d="M 115,125 L 115,140 L 185,140 L 185,125" stroke="orange" stroke-width="1.25" fill="none" />
|
||
<text x="150" y="155" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="9" text-anchor="middle" fill="orange">-5% (worse)</text>
|
||
|
||
<!-- 8192B: Locked vs Escaped (FASTER!) -->
|
||
<!-- Locked: 37.0ms (median) -->
|
||
<rect x="290" y="293" width="50" height="45" fill="green" fill-opacity="0.3" stroke="green" stroke-width="1.5" />
|
||
<line x1="290" y1="320" x2="340" y2="320" stroke="green" stroke-width="2" />
|
||
<text x="315" y="360" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="10" text-anchor="middle" font-weight="bold" fill="green">Locked</text>
|
||
<text x="315" y="373" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="9" text-anchor="middle" fill="green">37.0ms</text>
|
||
|
||
<!-- Escaped: 34.8ms (median) - 6% FASTER! -->
|
||
<rect x="360" y="313" width="50" height="40" fill="red" fill-opacity="0.3" stroke="red" stroke-width="1.5" />
|
||
<line x1="360" y1="340" x2="410" y2="340" stroke="red" stroke-width="2" />
|
||
<text x="385" y="360" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="10" text-anchor="middle" font-weight="bold" fill="red">Escaped</text>
|
||
<text x="385" y="373" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="9" text-anchor="middle" fill="red">34.8ms</text>
|
||
|
||
<!-- Comparison arrow (improved!) -->
|
||
<path d="M 315,125 L 315,140 L 385,140 L 385,125" stroke="blue" stroke-width="1.5" fill="none" />
|
||
<text x="350" y="155" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="10" text-anchor="middle" fill="blue" font-weight="bold">+6% (better!)</text>
|
||
|
||
<!-- 16384B: Locked vs Escaped (FASTER!) -->
|
||
<!-- Locked: 37.4ms (median) -->
|
||
<rect x="490" y="287" width="50" height="48" fill="green" fill-opacity="0.3" stroke="green" stroke-width="1.5" />
|
||
<line x1="490" y1="307" x2="540" y2="307" stroke="green" stroke-width="2" />
|
||
<text x="515" y="360" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="10" text-anchor="middle" font-weight="bold" fill="green">Locked</text>
|
||
<text x="515" y="373" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="9" text-anchor="middle" fill="green">37.4ms</text>
|
||
|
||
<!-- Escaped: 35.9ms (median) - 4% FASTER! -->
|
||
<rect x="560" y="300" width="50" height="42" fill="red" fill-opacity="0.3" stroke="red" stroke-width="1.5" />
|
||
<line x1="560" y1="327" x2="610" y2="327" stroke="red" stroke-width="2" />
|
||
<text x="585" y="360" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="10" text-anchor="middle" font-weight="bold" fill="red">Escaped</text>
|
||
<text x="585" y="373" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="9" text-anchor="middle" fill="red">35.9ms</text>
|
||
|
||
<!-- Comparison arrow (improved!) -->
|
||
<path d="M 515,125 L 515,140 L 585,140 L 585,125" stroke="blue" stroke-width="1.5" fill="none" />
|
||
<text x="550" y="155" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="10" text-anchor="middle" fill="blue" font-weight="bold">+4% (better!)</text>
|
||
|
||
<!-- 32768B: Locked vs Escaped (neutral) -->
|
||
<!-- Locked: 41.8ms (median) -->
|
||
<rect x="690" y="247" width="50" height="50" fill="green" fill-opacity="0.3" stroke="green" stroke-width="1.5" />
|
||
<line x1="690" y1="267" x2="740" y2="267" stroke="green" stroke-width="2" />
|
||
<text x="715" y="320" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="10" text-anchor="middle" font-weight="bold" fill="green">Locked</text>
|
||
<text x="715" y="333" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="9" text-anchor="middle" fill="green">41.8ms</text>
|
||
|
||
<!-- Escaped: 41.2ms (median) - 1% neutral -->
|
||
<rect x="760" y="253" width="50" height="48" fill="red" fill-opacity="0.3" stroke="red" stroke-width="1.5" />
|
||
<line x1="760" y1="273" x2="810" y2="273" stroke="red" stroke-width="2" />
|
||
<text x="785" y="320" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="10" text-anchor="middle" font-weight="bold" fill="red">Escaped</text>
|
||
<text x="785" y="333" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="9" text-anchor="middle" fill="red">41.2ms</text>
|
||
|
||
<!-- Comparison arrow -->
|
||
<path d="M 715,185 L 715,200 L 785,200 L 785,185" stroke="gray" stroke-width="1.25" fill="none" />
|
||
<text x="750" y="215" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="9" text-anchor="middle" fill="gray">-1% (neutral)</text>
|
||
</g>
|
||
|
||
<!-- Interpretation box -->
|
||
<g transform="translate(80, 490)">
|
||
<rect x="0" y="0" width="800" height="40" fill="lightyellow" stroke="black" stroke-width="1.25" />
|
||
<text x="10" y="18" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="11" font-weight="bold">
|
||
Key Insight:
|
||
</text>
|
||
<text x="80" y="18" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="11">
|
||
Escaped regime (high K) is architecturally favorable at 8KB and 16KB (L1→L2 cache transition)
|
||
</text>
|
||
<text x="10" y="33" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="10">
|
||
But at 6KB (cache-misaligned), escaped regime still suffers from cache penalty despite reaching higher K values
|
||
</text>
|
||
</g>
|
||
|
||
<!-- Legend (top right) -->
|
||
<g transform="translate(720, 90)">
|
||
<rect x="0" y="0" width="140" height="70" fill="white" stroke="black" stroke-width="1.25" />
|
||
<text x="70" y="18" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="11" font-weight="bold" text-anchor="middle">
|
||
Legend
|
||
</text>
|
||
|
||
<rect x="10" y="25" width="20" height="15" fill="green" fill-opacity="0.3" stroke="green" stroke-width="1.5" />
|
||
<text x="35" y="36" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="10">Locked regime</text>
|
||
|
||
<rect x="10" y="45" width="20" height="15" fill="red" fill-opacity="0.3" stroke="red" stroke-width="1.5" />
|
||
<text x="35" y="56" font-family="Liberation Sans, DejaVu Sans, sans-serif" font-size="10">Escaped regime</text>
|
||
</g>
|
||
</svg> |