JuliaPy / JuliaPy/PythonCall.jl
how to optimize reading long tuples from julia to python
- 主要语言
- Julia
- 星标
- 1.1k
- 派生
- 86
- 平均合并
- 1 天 22 小时
- 30 天内合并 PR
- 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