0

It's happened a few times where I'm curious about the runtime (in big O notation) of built in python function. For example, I'm considering using a frozenset for a particular python application, but I was curious about the runtime for both inserting and checking membership. The official documentation on frozen sets doesn't mention it, however, I did find this other question which showed a snippet of the hash implementation. From the single for loop, I'm going to say hashing is O(n) (though I don't know exactly what happens in the hash() function), and generally sets are used because checking membership is O(1) once hashed so O(n) overall. However, I was wondering if there's anywhere anyone can find runtime documentation on built in functions in any language. Perhaps a shite I don't know of?

Isaac Torres
  • 101
  • 5

0 Answers0