Closed blegat closed 3 years ago
When reading andora.osm.pbf with OpenStreetMapX, the timing is: Before this PR:
andora.osm.pbf
julia> @time OpenStreetMapX.parsePBF("/home/blegat/Downloads/andorra-latest.osm.pbf"); 0.819850 seconds (1.58 M allocations: 183.134 MiB, 17.31% gc time)
After ProtoBuf PR:
julia> @time OpenStreetMapX.parsePBF("/home/blegat/Downloads/andorra-latest.osm.pbf"); 0.358973 seconds (1.14 M allocations: 176.507 MiB, 16.71% gc time)
So we get more than 2x speedup. The reason is that Julia is not specializing on jtyp hence I think the method lookup reader(iob, jtyp) is done at runtime instead of compilation time.
jtyp
reader(iob, jtyp)
When reading
andora.osm.pbf
with OpenStreetMapX, the timing is: Before this PR:After ProtoBuf PR:
So we get more than 2x speedup. The reason is that Julia is not specializing on
jtyp
hence I think the method lookupreader(iob, jtyp)
is done at runtime instead of compilation time.