JuliaPy / JuliaPy/PyCall.jl

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

オープン
#90 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
performance
主要言語
Julia
スター
1.5k
フォーク
186
PR マージ指標
30日以内にマージされた PR はありません

説明

As discussed [on julia-users](https://groups.google.com/d/msg/julia-users/1M8wDT0e5h4/qZ2OPaM9Hi4J), the two pathways to converting a Python list to a `Vector{Int}` seem mysteriously different in performance. For example:

``` julia
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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。