JuliaPy / JuliaPy/PythonCall.jl

how to optimize reading long tuples from julia to python

オープン
#575 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
Julia
スター
1.1k
フォーク
86
平均マージ
1日 22時間
マージ済み PR(30日)
3

説明

**Is your feature request related to a problem? Please describe.**
This code takes around 7s on a modern i9 the first time that it's executed. It's immediate the next times it's executed. It's also immediate to execute `(zeros(20_000)...,)` in julia.
I have python 3.12 and julia 1.10.5
```python
import juliacall
v=juliacall.Main.seval("(zeros(20_000)...,)");
```

**Describe the solution you'd like**
Is there any way to speed up the initial compilation?

**Describe alternatives you've considered**
I tried to use this code to to speed up reading data from julia to python by going through a tuple. Looping a long julia vector from python is much slower than looping a tuple ( around 4 times slower to read a 100_000 floats vector vs reading a tuple)

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

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

調査の方向性

Start by reproducing the juliacall.Main.seval example with Python 3.12 and Julia 1.10.5, measuring first-run and subsequent-run times for the long tuple and vector cases. Trace the tuple conversion and compilation path, then compare the results against the reported 7-second startup and four-times-slower vector iteration; done should be a verified optimization or a documented technical limitation.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
julia, python
領域
performance
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

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

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