-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
I have a pull request that addresses this issue.
I came across this while developing my package
LazyTables.jlThis should greatly improve performance of
TypedTables(although for complex row by row operationsLazyTablesshould still outperform).As you can see for a simply indexing operation
TypedTablesmakes 24 allocations when it only needs to make one.(@v1.8) pkg> free TypedTables Resolving package versions... Updating `~/.julia/environments/v1.8/Project.toml` [9d95f2ec] ~ TypedTables v1.4.1 `~/.julia/dev/TypedTables` ⇒ v1.4.1 Updating `~/.julia/environments/v1.8/Manifest.toml` [9d95f2ec] ~ TypedTables v1.4.1 `~/.julia/dev/TypedTables` ⇒ v1.4.1 julia> using TypedTables [ Info: Precompiling TypedTables [9d95f2ec-7b3d-5a63-8d20-e2491e220bb9] WARNING: method definition for broadcasted at /home/mark/.julia/packages/TypedTables/dycVq/src/DictTable.jl:301 declares type variable N but does not use it. WARNING: method definition for broadcasted at /home/mark/.julia/packages/TypedTables/dycVq/src/DictTable.jl:305 declares type variable N but does not use it. WARNING: method definition for broadcasted at /home/mark/.julia/packages/TypedTables/dycVq/src/DictTable.jl:309 declares type variable N but does not use it. WARNING: method definition for broadcasted at /home/mark/.julia/packages/TypedTables/dycVq/src/DictTable.jl:313 declares type variable N but does not use it. WARNING: method definition for broadcasted at /home/mark/.julia/packages/TypedTables/dycVq/src/DictTable.jl:317 declares type variable N but does not use it. julia> table = Table(NamedTuple(Symbol(s) => rand(rand((Bool, Float32, Int, Float64)), 1000) for s in Char.(97:122))); julia> table[3]; @time table[3]; 0.000011 seconds (24 allocations: 1.250 KiB)(@v1.8) pkg> dev TypedTables Resolving package versions... No Changes to `~/.julia/environments/v1.8/Project.toml` No Changes to `~/.julia/environments/v1.8/Manifest.toml` julia> using TypedTables julia> table = Table(NamedTuple(Symbol(s) => rand(rand((Bool, Float32, Int, Float64)), 1000) for s in Char.(97:122))); julia> table[3]; @time table[3]; 0.000004 seconds (1 allocation: 144 bytes)
andyferris
Metadata
Metadata
Assignees
Labels
No labels