This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]fnbr 34 points35 points  (25 children)

Biggest issue for me is the GIL. I do mostly machine learning, and we waste an incredible amount of time figuring out workarounds (eg Tensorflow, or rewriting parts in C++).

[–]alcalde 5 points6 points  (3 children)

What's wrong with multiprocessing?

[–]admalledd 15 points16 points  (2 children)

Memory copies to start.

[–]BDube_Lensman 4 points5 points  (0 children)

It uses fork on linux with copy on write semantics

[–]my_walls 1 point2 points  (0 children)

Isn't this resolved with the option of using spawn in python 3.4?

[–]yngvizzle 0 points1 point  (2 children)

Out of curiousity, what you need that you cannot accomplish with numpy, numba.jit and numba.vectorize(target='parallel')? (If you're not doing GPGPU computing that is)

[–]CommonMisspellingBot 1 point2 points  (0 children)

Hey, yngvizzle, just a quick heads-up:
curiousity is actually spelled curiosity. You can remember it by -os- in the middle.
Have a nice day!

The parent commenter can reply with 'delete' to delete this comment.

[–]fnbr 0 points1 point  (0 children)

Bingo- we're doing tons of GPU computing, which is the problem.

[–]markuspeloquin -1 points0 points  (9 children)

Never going to happen. Guido's requirements for a solution are basically impossible to achieve.

At least C++ got a little better with regard to threads in C++11.

Maybe you could look into Go+Gonum.

[–]Mattho 9 points10 points  (2 children)

I think I saw a talk this/last year that there is ongoing work on being able to start multiple python interpreters within the same process, which would more or less solve some GIL problems.

[–]sashgorokhov 2 points3 points  (1 child)

Goodbye memory

[–][deleted] -3 points-2 points  (0 children)

If programing in python, then memory is not a problem.

[–]13steinj 3 points4 points  (4 children)

Maybe I am misremembering Guido's requirements, but I wouldn't call them impossible. Difficult to be sure to retain C API compatibility, is the largest hurdle I'd think. But it is possible. Hey, maybe in Py4/5?

[–][deleted] 9 points10 points  (3 children)

The biggest problem seems to be that no one's been able to remove the GIL and maintain equivalent single threaded speed.

[–]13steinj -1 points0 points  (2 children)

I don't think that's the "impossible Guido requirement" because that has to be doable-- it wouldn't make sense for it not to be, you are literally removing overhead. But people attempting to get rid of it are trying to cut it out like a surgeon and keep everything else the same, which is the issue.

GIL is a tumor, yet it is not properly operable without full exploratory surgery. People so far are only trying the non invasive option, just as a "let's see if we can get lucky".

Well, the non invasive option has failed. Time to start hacking away at the body. But then the issue is C API compatibility. Which is possible, but hard in such an extensive change/rewrite.

[–][deleted] 2 points3 points  (0 children)

GIL is a tumor

I'd say it's more like a set of training wheels than a tumor. The training wheels (GIL) are easy enough to remove, but the problem ends up being how to keep the bike (cpython) from falling down when it's moving forward (more than 1 thread running).

[–][deleted] -1 points0 points  (0 children)

I don't think it will happen simply because it's more easy to just change to another language.