Dev48
Language
  • About
  • Services
  • Industries
  • Technologies
  • Articles
  • Contacts
Book a call
    Home/Articles/Direct mapping the hidden optimization
Dev48
info@dev48.org+375 29 320-40-96WhatsApp@isky_by

© 2026 · All rights reserved.

Direct Mapping: The hidden optimization

Фото: José Martín Ramírez Carrasco (Unsplash) — https://unsplash.com/photos/person-holding-white-printer-paper-yhNVwsKTSaI?utm_source=dev48&utm_medium=referral

Source: Solana Media•December 2, 2026 at 11:12 AM

Direct Mapping: The hidden optimization

A measurement of how Direct Mapping changed transaction execution time on mainnet, by program, by account data volume, and in absolute time saved per MiB of account data passed to programs.

Why This Matters, by Stakeholder

  • Trading engine developers. Direct Mapping reduces copying when an engine repeatedly passes large market accounts between instructions.
  • Traders and market makers. Orders can execute faster once they reach the validator. Confirmation time is a separate question.
  • Validators and client teams. The overall gain depends on the transaction mix.

TL;DR

  • Each additional MiB of account data was associated with 44 µs more time saved after activation, rising to 50 µs/MiB above 1 MiB.
  • Phoenix Perp saw a 46% median reduction in execution time, compared with 3–4% for the other five programs.
  • Gains in execution time on average tx are hidden by other CU-expensive tasks At the same data volume, two groups both saved about 60–70 µs. That meant 53% less execution time for the low-CU transactions and 9% less for the high-CU ones.
  • At the same data volume, two groups both saved about 60–70 µs. That meant 53% less execution time for the low-CU transactions and 9% less for the high-CU ones.

Relevant Charts

Each histogram compares successful transactions matched by main program, instruction, target call path, and a 10% band of consumed compute units (CU). Negative values mean faster execution after activation. Each group is weighted by its transaction count in the smaller period.

The left panel groups transactions across programs by estimated non-token account bytes and a 10% CU band. Color shows median CU. The byte estimate counts an account again each time it is passed to another call. At exactly 1,624,828 bytes (right), median execution time fell by 52.5% at about 13,000 CU and by 8.8% at about 187,000 CU.

Each point shows the difference between median execution times before and after activation for one group matched by bytes and CU. Positive values mean time saved. Across all 4,769 groups (left), the weighted fit associates each additional MiB with 0.0438 ms more time saved. Among the 229 groups above 1 MiB (right), the estimate rises to 0.0495 ms per MiB.

Introduction

It’s Christmas, and your family is choosing 100 photos for a year-end album from a collection of 2,000 high-resolution pictures. Your parents have one small request: swap the group photo for the one where Grandma has her eyes open. Imagine having to send them all 2,000 photos again just to make that one change. If they ask for another swap tomorrow, you send the whole collection again.

Now imagine you all have access to a shared album. Your parents can open it, find the better photo, and make the swap. They still have to choose the photo they want. What disappears is the wait for another copy of the collection.

Direct Mapping (DM) brings the same idea to Solana. A program keeps the information it works with in records called accounts. Before Direct Mapping, the computer running a program could copy an entire account into the program’s workspace, even if the program needed only one entry. Calling the same program again with the same account could mean copying those same bytes again.

With Direct Mapping, the program can access the account where it already sits in memory, subject to the same rules about what it may read or change. The larger the account, and the more times it is passed to a program, the more time this can save.

This analogy, despite being naive, suggests what to look for when measuring the effects of Direct Mapping on Solana. For a detailed explanation of the upgrade, see the Solana Foundation’s guide to Direct Mapping.

How we measured execution time

In this analysis, we use a single mainnet Firedancer validator and record execution-start to commit-start elapsed time for 748 slots before activation (epoch 1096) and 748 slots after activation (epoch 1098).

We use Firedancer data for a practical reason: its transaction-level execution timings are easy to retrieve. We use the same validator before and after activation because execution time can vary across validators even for transactions that consume similar CU (see e.g. here). Pooling measurements from several validators can add noise and consequently bias the comparison.

We use successful transactions with observed timings and consumed compute units (CU). Each measurement covers the entire transaction, including direct and inner calls.

Relative execution time by program

A transaction enters a program panel if it calls the target directly or through another program. For each target, we match the classified main program, main instruction, target call mode, and a geometric 10% band of consumed CU. The main program is usually the first top-level application program reached.

Fig. 1: Each histogram compares successful transactions matched by main program, instruction, target call path, and a 10% band of consumed compute units (CU). Negative values mean faster execution after activation. Each group is weighted by its transaction count in the smaller period.

From this result we see how DM, despite having overall improved execution time, seems to highly favor one program over others (we acknowledge the modest sample size). At first glance this may seem unreasonable, but the truth is that we should look closely.

A Phoenix transaction

Phoenix transactions in our sample look like this one, with three separate instructions each referencing the same two large accounts, the Perp Asset Map and Orderbook. Our later measurements put their sizes at 1,622,064 and 1,185,216 bytes.

The same two records occupied 2,807,280 bytes. Passing them three times created three occasions when copying them could cost time. This is exactly where Direct Mapping can avoid work on each handoff.

Global changes at fixed bytes and comparable CU

The program-level results show how much execution times changed after activation, but transactions that call the same program can do very different work. Some pass large accounts to the program several times. Others spend most of their time on computation. Direct Mapping reduces the work of copying account data, so an overall average can hide differences between these workloads.

To see whether the timing changes follow that pattern, we now look across programs. We compare transactions before and after activation that pass the same measured volume of account data and consume similar CU. This lets us examine how the relative change in execution time varies with data volume at comparable levels of computation.

Fig. 2: The left panel groups transactions across programs by estimated non-token account bytes and a 10% CU band. Color shows median CU. The byte estimate counts an account again each time it is passed to another call. At exactly 1,624,828 bytes (right), median execution time fell by 52.5% at about 13,000 CU and by 8.8% at about 187,000 CU.

The global plot suggests that the relative speedup becomes easier to see when transactions pass several MiB of account data. There is no sharp cutoff in the figure. At smaller volumes, the time saved on copying can be a small fraction of the time spent executing the transaction, especially when other computation accounts for much of that time.

The right panel makes this easier to see by holding the data volume fixed at 1,624,828 bytes. The relative speedup generally falls as CU consumption rises. At roughly 13,000 CU, median execution time falls from 0.130 to 0.062 ms, a 52.5% improvement. At roughly 187,000 CU, it falls from 0.699 to 0.637 ms, an 8.8% improvement. Yet the absolute savings are similar: 0.068 ms and 0.061 ms. The second percentage is much smaller because the transaction took longer to begin with.

This changes the question we ask. If Direct Mapping saves time in proportion to the amount of account data passed to programs, how many milliseconds are saved per additional MiB? To test that relationship, we now measure absolute time saved per transaction.

Absolute time saved per transaction

We group successful transactions that pass the same measured number of non-token account bytes and consume a similar number of compute units (within the same 10% band). For each group, we subtract the median execution time after activation from the median before activation. Each point in the figure below shows this difference in milliseconds. Positive values mean faster execution after activation.

Fig. 3: Each point shows the difference between median execution times before and after activation for one group matched by bytes and CU. Positive values mean time saved. Across all 4,769 groups (left), the weighted fit associates each additional MiB with 0.0438 ms more time saved. Among the 229 groups above 1 MiB (right), the estimate rises to 0.0495 ms per MiB.

Across all 4,769 matched groups, each additional MiB of account data passed to programs is associated with 0.0438 ms more execution time saved after activation. Above 1 MiB, the estimate rises to 0.0495 ms per MiB, and the relationship is tighter.

For a trading engine that repeatedly passes large market accounts but performs relatively little computation, copying those accounts can take up a meaningful share of execution time. Direct Mapping can reduce that overhead each time the accounts are passed. A more compute-intensive transaction can save a similar number of milliseconds while showing a much smaller percentage improvement.

← All articles

What this article says

More in FinTech & Banking

All →
PayPal and Venmo Commit More Than $3.5 Million in Giving Tuesday Donation Matches
Paypal

PayPal and Venmo Commit More Than $3.5 Million in Giving Tuesday Donation Matches

AJ Bell vs Vanguard comparison: Which is best for UK investors?
Wise

AJ Bell vs Vanguard comparison: Which is best for UK investors?

Trading 212 vs Hargreaves Lansdown comparison: which is best for UK investors?
Wise

Trading 212 vs Hargreaves Lansdown comparison: which is best for UK investors?

Building Financial AI Agents on AWS and Airwallex
Airwallex

Building Financial AI Agents on AWS and Airwallex

Arvest Bank Selects Visa DPS to Power Credit Processing
Visa

Arvest Bank Selects Visa DPS to Power Credit Processing

Preparing CFOs for the Agentic Banking Era
Airwallex

Preparing CFOs for the Agentic Banking Era

More from Solana

Follow-Ups + Turning Breakpoint into ROI (Part 5)
Solana

Follow-Ups + Turning Breakpoint into ROI (Part 5)

Day 2 at Breakpoint 2026: AI, Compute, and Britain's Tokenisation Push
Solana

Day 2 at Breakpoint 2026: AI, Compute, and Britain's Tokenisation Push

Day 1 at Breakpoint 2026: Mainnet 1.0, Zelle, and London’s Crypto Moment
Solana

Day 1 at Breakpoint 2026: Mainnet 1.0, Zelle, and London’s Crypto Moment

CoinGecko Accelerates Its Next Phase of Growth, Backed by Solana Foundation
Solana

CoinGecko Accelerates Its Next Phase of Growth, Backed by Solana Foundation

Solana 1.0: Dropping -beta, and what comes next
Solana

Solana 1.0: Dropping -beta, and what comes next

DTCC Tokenization Service to Connect with Solana
Solana

DTCC Tokenization Service to Connect with Solana