2 ms·
The great majority of them should be intuitive to any competent programmer, imo, at least within a ballpark. Some of it is implementation detail (list append is
by mahmud 16y ago
The great majority of them should be intuitive to any competent programmer, imo, at least within a ballpark. Some of it is implementation detail (list append isn't required to be constant, and could be O(N) in a naive implementation, for example) but generally, you should have an intuitive feel for this stuff across languages.
Sometimes you can almost guess how a language is implemented just from profiling data.
- ohmygodel 16y agoI went specifically looking for this information a week ago when I was learning Python. It wasn't clear to me how a list was implemented, and in particular if random access and deletes were constant or linear time
- jemfinch 16y agoWhich is exactly why it should never have been called "list". If it were "vector" or "array" you'd never have even wondered.