title: Fastest way to calculate a heavy function between elements of two different lists
body: <p>As written in the title I would like to know if there is a faster way than the one I found to perform a computationally complex function between elements of two lists.</p>
  <p>Here as an example I will take the factorial but the function is a dynamo function that checks if there are intersections between two elements.</p>
  <p>This is what I've been able to do so far. Can anyone help me?</p>
  <pre><code>%%time
  import random
  import itertools
  import math
  random.seed(10)
  
  list1=[random.randint(1, 100) for i in range(10000)]
  list2=[random.randint(1, 10) for i in range(100)]
  
  two_lists=[list1,list2]
  permutation = itertools.product(*two_lists) # I obtain the permutation ty Cyttorak
  result=[math.factorial(x[0]+x[1]) for x in permutation] # The complex operation (factorial of the sum)
  </code></pre>
  <pre><code>Wall time: 1.11 s
  </code></pre>