JuliaPy / JuliaPy/PythonCall.jl
how to optimize reading long tuples from julia to python
- Lenguaje dominante
- Julia
- Estrellas
- 1.1k
- Forks
- 86
- Merge medio
- 1 d 22 h
- PR fusionados (30 d)
- 3
Descripción
**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)
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- julia, python
- Área
- performance
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 35/100