-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Hello, I have more a question than a real issue.
When parsing strings composed of multiple float numbers, I get a lot of allocations I do not understand.
The following example
using Scanf, BenchmarkTools
s = "1.39086e+00 1.39391e+00 1.39544e+00 1.39239e+00 1.41680e+00 1.41375e+00"
@btime @scanf($s, "%13e%13e%13e%13e%13e%13e", Float32, Float32, Float32, Float32, Float32, Float32)produces
6.560 μs (35 allocations: 1.88 KiB)
I can't really make sense of all these allocations. Could you please help me understand where they come from ?
For large datasets of the same kind, scanf becomes the bottleneck due to the number of allocations performed there.
Best regards.
Metadata
Metadata
Assignees
Labels
No labels