Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
remuskaos
4y ago
0 comments
Save
Share
Did you use python specific functions like list comprehensions, or "classic" for/while loops? Because I've found the former to be surprisingly fast, while naive for loops are incredibly slow in python.
0 comments
2 comments · 2 top-level
top
newest
oldest
bbojan
4y ago
I've used list comprehensions where they make sense. But it's a non-trivial (although a simple) program, so there are for loops too.
So I'm using a mix of chain and permutations from itertools, list comprehensions and for loops.
momojo
4y ago
Aren't most of the python primitives implemented in C?
j
/
k
navigate · click thread line to collapse