Originally posted by pininety
View Post
Announcement
Collapse
No announcement yet.
HOPE: The Ease Of Python With The Speed Of C++
Collapse
X
-
Originally posted by benmoran View PostFor those actually looking to compile python, check out Nuitka:
It converts to C++/C style code, does optimizations, and produces binaries (standalone like CX_Freeze, or not). I'm not the author, just a user.
Comment
-
Originally posted by mmstick View PostTry using Julia or Golang. Python isn't really needed anymore now that better programming languages are available.
So with python, I just get a library to deal with, lets say visa, and with julia, there is just nothing yet.
And the speed just doesn't matter as python is already fast enough.
Also, convincing my supervisor that I am allowed to use python was hard already, getting him to allow julia which nobody in our group knows (python was known by everybody at the time because all of us use it privately anyways.)
Comment
-
Originally posted by brk0_0 View PostSay that to my Monte Carlo simulation. I never even saw it ending with Python, and took just one minute to run with Julia.
But I was speaking about my lab work where I most of the time am limited by IO or jsut do not care if it takes 100ms or 1ms as my trigger only occurs once in half an hour.
I just need a lot of libraries (say for visa, communicating with stuff, having good zip tar etc support and so on) which julia is missing.
But hey, I am already learning julia just for the fun of it and to have it ready or just use it in the one case there I need the performance.
Comment
-
Originally posted by pininety View PostMy college was writing for over 3 weeks in C and his program still was not working.
I use a mix of languages, and ive never understood the idea that python would be so much easier than c++
static typing is so nice to have. It captures so many bugs at the compiletime instead of failing during runtime.
On the other hand, running things in interpretive mode is alsso nice. So a bit of pros and cons.d
Comment
-
Originally posted by AnonymousCoward View PostHey Michael, could you do some JITed language benchmarks in the future? Would be interesting to see how different JIT implementations compare.
I think LuaJIT would be the fastest JIT implementation, but it would be better to see actual benchmarks.
PS: If you do such comparisons, then do keep in mind that you should pre-compile the source files to their intermediate representations, otherwise implementations where pre-compiling is not required (LuaJIT, V8, PyPy, etc.) would be at a disadvantage vs Java where pre-compiling is required.
No Lua, but here's a paper comparing naive implementations of an econometrics algorithm in several languages (not fine-tuned for each platform):
Contrary to the smack talk in other posts, Python and the Numba JIT compiler achieved performance of about 1.5x C++ performance in this test.
Comment
-
Originally posted by Michael_S View PostThe real question is not whether a JIT compiler can match a language that's as close to the bare metal as C or C++. It can't.
Comment
-
Originally posted by wizard69 View PostI mean really how many Python speed up initiatives are there out there? Maybe it isn't meant to be fast.
What is more bothersome is that if they would upgrade to Modern C++ they would benefit greatly and would develop the programming skills required to manage C++. In some ways modern C++ is just as easy to work with as Python.
Comment
Comment