Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Alright, so with only 2 distinct values to map, 100,000,000 rows, it takes 6.67 seconds to run without "memoization", and 9.86 seconds with.
    – AMC
    Commented Feb 10, 2020 at 2:31
  • 100,000,000 rows, 52 distinct values, where 1 of those maps to the first output value, and the other 51 all correspond to the other: 7.99 seconds without memoization, 11.1 seconds with.
    – AMC
    Commented Feb 10, 2020 at 2:48
  • Are your values in random order? Or are they back to back? High speed of pandas could be due to caching @AMC Commented Feb 10, 2020 at 4:14
  • 1
    Are your values in random order? Or are they back to back? Values are random, selected using random.choices().
    – AMC
    Commented Feb 10, 2020 at 22:56