Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Optimize decoding of unions using a heuristic based on literals #115

Merged
merged 7 commits into from
Mar 4, 2023

Conversation

gcanti
Copy link
Contributor

@gcanti gcanti commented Feb 28, 2023

No description provided.

@gcanti gcanti marked this pull request as draft February 28, 2023 15:36
@gcanti gcanti marked this pull request as ready for review February 28, 2023 15:59
src/Parser.ts Outdated Show resolved Hide resolved
@gcanti gcanti force-pushed the feat/discriminated-unions branch 3 times, most recently from 7090329 to f746890 Compare March 2, 2023 08:09
test/Decoder.ts Outdated Show resolved Hide resolved
src/Parser.ts Outdated Show resolved Hide resolved
src/Parser.ts Show resolved Hide resolved
@gcanti gcanti force-pushed the feat/discriminated-unions branch 2 times, most recently from dd339eb to 1613da1 Compare March 2, 2023 17:19
@gcanti gcanti force-pushed the feat/discriminated-unions branch from 500d4ff to bf8576e Compare March 3, 2023 13:25
src/Parser.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@TylorS TylorS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! The performance of decoding unions with literals has definitely increased quite a bit

@gcanti gcanti merged commit 1555a81 into main Mar 4, 2023
@gcanti gcanti deleted the feat/discriminated-unions branch March 4, 2023 10:58
@github-actions github-actions bot mentioned this pull request Mar 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants