Skip to content

test: check that V8 keeps the generated serializers optimized - #887

Open
nigrosimone wants to merge 1 commit into
fastify:mainfrom
nigrosimone:test-deopt
Open

nigrosimone wants to merge 1 commit into
fastify:mainfrom
nigrosimone:test-deopt

Conversation

@nigrosimone

Copy link
Copy Markdown
Contributor

Nothing in the tests notices when a change makes V8 stop optimizing the generated code. It already happened with #812: the serializer of an object with a few hundred properties became too big for TurboFan and ran unoptimized until #838 made it smaller.

The new test/deopt.test.js makes V8 optimize the serializer of a set of schemas, serializes the same values again, and fails if the function is not optimized or gets deoptimized. node --trace-deopt test/deopt.test.js shows why a case fails.

The wide object case fails on 781be6a (#812) and passes on main.

@nigrosimone
nigrosimone marked this pull request as ready for review September 24, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant