uwekel > I bet (one more time) that you forgot to change the number of slot assign to pb's map.
That's one other reason it's so slow.
How many slots does Python's map have by default ?
In Pb you stack 100 000 elements on 512 slots only...
First point.
And second point, of course, Pb's map are not already sorted, i bet pb's map vs python's map
without sorting, of course. (Python probably use Judy's hashtable)
Pb's Helpfile wrote:
NewMap name.<type>([Slots])
The optional 'Slots' parameter defines how much slots the map will have have to store its elements. The more slots is has, the faster it will be to access an element, but the more memory it will use. It's a tradeoff depending of how many elements the map will ultimately contains and how fast the random access should be. The default value is 512. This parameter has no impact about the number of elements a map can contain
There are 2 methods to program bugless.
But only the third works fine.
Win10, Pb x64 5.71 LTS