Skip to content

This is close #2523, Optimize formulaArg struct memory layout - #2524

Open
shcabin wants to merge 1 commit into
qax-os:masterfrom
shcabin:2523-optimize-formula-arg-memory
Open

shcabin wants to merge 1 commit into
qax-os:masterfrom
shcabin:2523-optimize-formula-arg-memory

Conversation

@shcabin

@shcabin shcabin commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

PR Details

Optimize formulaArg memory layout to reduce memory allocation in formula matrix evaluation

Description

  • Remove the unused SheetName field from the unexported formulaArg struct (16 bytes saved on 64-bit platforms).
  • Reorder fields in formulaArg so that Type (ArgType, 1 byte) and Boolean (bool, 1 byte) are grouped together at the end after pointer-containing fields.
  • This eliminates internal alignment padding (two 7-byte holes), shrinking formulaArg from 136 bytes to 112 bytes (~17.6% smaller)

Related Issue

Closes #2523
Related Issue GHSA-3gf9-fm9h-4f37

Motivation and Context

How Has This Been Tested

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@codecov

codecov Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.72%. Comparing base (7d5f820) to head (1b040c1).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2524   +/-   ##
=======================================
  Coverage   99.72%   99.72%           
=======================================
  Files          32       32           
  Lines       33228    33231    +3     
=======================================
+ Hits        33138    33141    +3     
  Misses         88       88           
  Partials        2        2           
Flag Coverage Δ
unittests 99.72% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@xuri xuri added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimize formulaArg struct memory layout to reduce formula matrix allocation

2 participants