Comment

Comment by bgwalter

You can modify the posted script to eliminate global variables:

  def f():
      l = [0]
      for i in range(100000000):
          l += [2]
      return l

  x = f()
  print(x[0])
Timings:

  3.9:                    8.6s

  3.14:                   8.7s

  3.14 (free-threading): 11.6s
3.14 is not faster than 3.9 and the free-threading build is 33% slower.
parent bgwalter 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton