Skip to content

Conversation

@pdimens
Copy link

@pdimens pdimens commented May 26, 2020

This PR uses the convert_coord() function in pdimens/PopGen.jl to make ten() faster and more flexible. Flexible in the sense that it can tolerate cardinal directions as well, such as "11 32 42S". In the current form, ten uses a deprecated version of replace and will not function for julia 1.x
Before:

julia> @btime ten("-10 26")
  2.135 μs (33 allocations: 1.52 KiB)
-10.433333333333334

After:

julia> @btime ten("-10 26")
  1.571 μs (18 allocations: 928 bytes)
-10.433333333333334

This PR uses the convert_coord() function in pdimens/PopGen.jl to make ten() faster and more flexible. Flexible in the sense that it can tolerate cardinal directions as well, such as "11 32 42S".
Before:
julia> @Btime ten("-10 26")
  2.135 μs (33 allocations: 1.52 KiB)-10.433333333333334

julia> @Btime ten("-10 26")
  1.571 μs (18 allocations: 928 bytes)-10.433333333333334
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants