JuliaPy / JuliaPy/PythonCall.jl

how to optimize reading long tuples from julia to python

Ouverte
#575 6 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
enhancement
Langage dominant
Julia
Étoiles
1.1k
Forks
86
Merge moyen
1 j 22 h
PR mergées (30 j)
3

Description

**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)

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
julia, python
Domaine
performance
Type d'issue
Fonctionnalité
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.