Skip to content

convert(Vector{Int}, o) is much slower than copy(PyVector{Int}(o)) #90

Open
@stevengj

Description

@stevengj

As discussed on julia-users, the two pathways to converting a Python list to a Vector{Int} seem mysteriously different in performance. For example:

iv = PyVector(rand(Int16, 10^6))
@time copy!(Array(Int, length(iv)), iv);
@time convert(Vector{Int}, iv.o);

yields 3-5× slower performance for the second version on my machine.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions