I find Python's speed is highly uneven and dependent on what you are doing with it.
I find Python's speed is highly uneven and dependent on what you are doing with it. Are you doing something that has some kind of underlying C implementation (file I/O usually)? Then it should be pretty quick. Are you doing something that is all handled by the Python interpreter? Expect it to be slower than you'd like. e.g. for loops in Python are usually slower than list comprehensions. It can be kind of frustration to write a bunch of code that runs lightning quick and then suddenly see your runtimes explode when you add a few more fairly trivial lines to complete off some code. I'd almost rather Python had a more consistent performance profile even if it was a bit slower on average than fastest possible, because it would make it easier to reason about the performance of your code. So far I mainly just use the default Python implementation, but if you're really struggling with it, it's probably worth it to look into using one of the JIT or JVM implementations for more consistent speed profiles. BTW, there's also all sorts of weird performance tweaks in the community...mostly of the form of syntax A vs. syntax B, and I've found that surprisingly few of them are "real" or offer more than trivial speedups. In other cases, in other languages, you know what you need to do to speed things up, but Python either doesn't offer that mechanism in the language or buries it under somewhere else (try finding out how to preallocate lots of entries in a dictionary instead of incrementally growing it, it exists, but it's almost impossible to find using search words like "preallocate")
Posted by bane on Jun 21, 2015, 2:32 PM
Tags
Related issues
- The biggest problem with having an LLM do this, from what I've observed of at least frontier models, is that the way they are trained...
- The biggest problem with MOND is that it was hand-crafted with additional parameters simply to fit the data.
- (My comment is about detached houses).
- The biggest problem with this is that I can't run my company's own internal benchmarks against this API, because they will be trained int...
- > steer Claude away from over-engineering parts of the system in response to hypothetical concerns.
- Why is there no comparison with FLUX 3 Image?
Raise real-world problems, find people facing the same issue, and discuss solutions.6,000 issues0 comments
hackernews (Other)
The biggest problem with having an LLM do this, from what I've observed of at least frontier models, is that the way they are trained...
The biggest problem with MOND is that it was hand-crafted with additional parameters simply to fit the data.
(My comment is about detached houses).
The biggest problem with this is that I can't run my company's own internal benchmarks against this API, because they will be trained int...
> steer Claude away from over-engineering parts of the system in response to hypothetical concerns.
Why is there no comparison with FLUX 3 Image?
> our Git monorepo was developing an annoying problem Sentences like this are so common from people using monorepos that I am convinced ...
Why is there no contact form?
I find Python's speed is highly uneven and dependent on what you are doing with it.
I find Python's speed is highly uneven and dependent on what you are doing with it. Are you doing something that has some kind of underlying C implementation (file I/O usually)? Then it should be pretty quick. Are you doing something that is all handled by the Python interpreter? Expect it to be slower than you'd like. e.g. for loops in Python are usually slower than list comprehensions. It can be kind of frustration to write a bunch of code that runs lightning quick and then suddenly see your runtimes explode when you add a few more fairly trivial lines to complete off some code. I'd almost rather Python had a more consistent performance profile even if it was a bit slower on average than fastest possible, because it would make it easier to reason about the performance of your code. So far I mainly just use the default Python implementation, but if you're really struggling with it, it's probably worth it to look into using one of the JIT or JVM implementations for more consistent speed profiles. BTW, there's also all sorts of weird performance tweaks in the community...mostly of the form of syntax A vs. syntax B, and I've found that surprisingly few of them are "real" or offer more than trivial speedups. In other cases, in other languages, you know what you need to do to speed things up, but Python either doesn't offer that mechanism in the language or buries it under somewhere else (try finding out how to preallocate lots of entries in a dictionary instead of incrementally growing it, it exists, but it's almost impossible to find using search words like "preallocate")
Comments (0)
No comments yet. Start the discussion.