EntropySink

Nothing & Everything => Open Discussion => Topic started by: -KEN- on April 11, 2008, 01:38:53 AM

Title: "Like going from C to Python..."
Post by: -KEN- on April 11, 2008, 01:38:53 AM
So, I just cross-posted this to my thread in Programming, but I wanted to share this with everyone...

It's a little creepy for me because I've actually been saying this to people recently :v:
Title: Re: "Like going from C to Python..."
Post by: Perspective on April 11, 2008, 12:04:31 PM
That one hits home for me too. I recently worked on a project in python, it was awesome and so easy to build. Then we tried to scale it up to gigs of data... *WHAM* python couldn't handle it so we rewrote the entire back-end in C++.
Title: Re: "Like going from C to Python..."
Post by: -KEN- on April 11, 2008, 01:02:51 PM
Haha, well at least we've got the skills to re-write the back-ends when our higher-level languages fail us.
Title: Re: "Like going from C to Python..."
Post by: Mike on April 11, 2008, 01:32:11 PM
The comic was ok, really didn't laugh until the Calvin and Hobbes reference.

Haven't tried Python yet, mainly because I haven't had a need for it.
Title: Re: "Like going from C to Python..."
Post by: VBprogrammer on April 12, 2008, 12:39:35 PM
That one hits home for me too. I recently worked on a project in python, it was awesome and so easy to build. Then we tried to scale it up to gigs of data... *WHAM* python couldn't handle it so we rewrote the entire back-end in C++.

Hmm, one of Python's big advantages is its interoperability with C/C++. Typically you would produce the application in Python then rewrite the tightly looped parts in C. Saying that, you'd probably be surprised at how fast a Python guru could make your code run. Though that takes some real knowledge of CPythons implementation!
Title: Re: "Like going from C to Python..."
Post by: Perspective on April 12, 2008, 12:49:17 PM
The problem was with the number of objects we create. Because python will manage them, it starts to bog down once you get 10s of millions. I even wrote a simple python app that just creates an object wrapping one char over and over, you can see how quickely it slows down. It can get about an order of magnitude more if you use internal structures (lists or tuples), but still not enough for our app.