Skip to content

Serialize small Ints as JSON Ints#5947

Open
antonydellavecchia wants to merge 13 commits intomasterfrom
adv/optimize-serialize-ints
Open

Serialize small Ints as JSON Ints#5947
antonydellavecchia wants to merge 13 commits intomasterfrom
adv/optimize-serialize-ints

Conversation

@antonydellavecchia
Copy link
Copy Markdown
Collaborator

@antonydellavecchia antonydellavecchia commented Apr 16, 2026

Serialize Integers between 1 - 2^53 and 2^53 -1 as JSON numbers.

possible this wont need upgrade, but will see what tests say.

@antonydellavecchia antonydellavecchia added serialization release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes labels Apr 16, 2026
Comment thread src/Serialization/serializers.jl Outdated
@lgoettgens lgoettgens added extra-long Also run the extra-long tests during CI. enhancement New feature or request labels Apr 17, 2026
@lgoettgens lgoettgens changed the title serialize small Ints as JSON Ints Serialize small Ints as JSON Ints Apr 17, 2026
@antonydellavecchia
Copy link
Copy Markdown
Collaborator Author

antonydellavecchia commented Apr 21, 2026

handles part of #5482
or rather deals with the main issue but doesn't address the uni variate polynomials comment in the issue.
but arguably should resolve it?

Copy link
Copy Markdown
Member

@benlorenz benlorenz left a comment

Choose a reason for hiding this comment

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

Did you do any tests how this affects size and loading / savingspeed for any of the very large files that we have?

Comment thread src/Serialization/basic_types.jl
@antonydellavecchia
Copy link
Copy Markdown
Collaborator Author

antonydellavecchia commented Apr 22, 2026

this branch timings/allocations and filesize

julia> surface = load(joinpath(Oscar.oscardir, "data/Surfaces/k3_d12_pi14.mrdi"));

julia> @time save("/tmp/bla", surface)
  0.004963 seconds (90.13 k allocations: 3.246 MiB)

julia> @time load("/tmp/bla");
  0.059450 seconds (112.93 k allocations: 7.121 MiB)

julia> filesize("/tmp/bla")
78385

current master timings timings/allocations and filesize

julia> @time save("/tmp/bla", surface)
  0.007207 seconds (133.33 k allocations: 4.399 MiB)

julia> @time load("/tmp/bla");
  0.059776 seconds (130.93 k allocations: 7.516 MiB)

julia> filesize("/tmp/bla")
114385

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request extra-long Also run the extra-long tests during CI. release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes serialization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants