Author Topic: "Like going from C to Python..."  (Read 1242 times)

-KEN-

  • Some Other Mofo
  • Jackass In Charge
  • Posts: 1001
  • Karma: +75/-100
"Like going from C to Python..."
« 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:
« Last Edit: April 12, 2008, 01:36:50 PM by Govtcheez »

Perspective

  • badfish
  • Jackass In Charge
  • Posts: 4635
  • Karma: +64/-22
    • http://jeff.bagu.org
Re: "Like going from C to Python..."
« Reply #1 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++.

-KEN-

  • Some Other Mofo
  • Jackass In Charge
  • Posts: 1001
  • Karma: +75/-100
Re: "Like going from C to Python..."
« Reply #2 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.

Mike

  • Jackass In Charge
  • Posts: 11248
  • Karma: +168/-32
  • Ex Asshole - a better and more caring person.
Re: "Like going from C to Python..."
« Reply #3 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.

VBprogrammer

  • Back on GMT thank god
  • Jackass IV
  • Posts: 747
  • Karma: +13/-21
Re: "Like going from C to Python..."
« Reply #4 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!

Perspective

  • badfish
  • Jackass In Charge
  • Posts: 4635
  • Karma: +64/-22
    • http://jeff.bagu.org
Re: "Like going from C to Python..."
« Reply #5 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.