5 ms·
> I am a loyal C++/Fortran user but would like to try out Python as it is gaining increasing popularity. However, rewriting code in Python is a nightmare - I fe
by bragr 4y ago
> I am a loyal C++/Fortran user but would like to try out Python as it is gaining increasing popularity. However, rewriting code in Python is a nightmare - I feel the performance must be more than 100x slower than before!
I think I found your problem. TBH you might like Julia more than Python and you won't have to invent a new DSL in the process.
- stackbutterflow 4y agoPython is rising in popularity? I can't remember the last time I reached to Python for something. Not that it says anything about the language but it kinda disappeared from my bubble.
- azinman2 4y agoIt’s the first thing I’ll pick for most problems.
- ShamelessC 4y agoPython is extremely popular, yes.
- BerislavLopac 4y agoPython is pretty much the second best available language for everything.
- mountainriver 4y agoEver heard of machine learning?
- robomartin 4y ago> I feel the performance must be more than 100x slower than before! Not too far off. This paper [0] compared 27 languages for speed and energy efficiency (which is very interesting). Python was 72 times slower than C and consumed 76 times more energy. I think Python is a very useful language at many levels. Great for prototyping stuff. No doubt about that. If performance and energy efficiency are important, it seems obvious one has to look elsewhere. [0] https://haslab.github.io/SAFER/scp21.pdf https://haslab.github.io/SAFER/scp21.pdf
- naillo 4y agoIf you switch to julia you'd have to port over the entire pytorch ecosystem as well if you want to use this together with that (taichi has great compatability via `to_tensor`). Also, the kernels you write in taichi is hardly a DSL, they're nearly indistinguishable from normal python code (minus the rare occasional caveat).
- bragr 4y ago>If you switch to julia you'd have to port over the entire pytorch ecosystem Not if you're porting from Fortran in the first place as the author claims.
- deleted 4y ago[deleted]
- yazzku 4y agoI tried Julia and I had to wait several seconds for my program to start due to JIT even for very trivial applications. Did I do anything wrong? Seemed like the worst of both worlds. Python runs slow but at least it starts fast.
- nkozyra 4y agoFrom my limited experience that's the trade-off, yes. Each of the last three Julia releases has touted startup optimizations.
- pjmlp 4y agoPlus while it still can't do wonders in productivity, using something like C++20 alongside VC++ or Clion, is quite approachable. Specially with SYCL or CUDA with standard C++ latest efforts.