• 10 Posts
  • 326 Comments
Joined 2 years ago
cake
Cake day: July 30th, 2023

help-circle


  • TLDR: 3.11 is twice as fast as 3.10 at doing global name lookups, so an old speedup hack of aliasing a global function locally isn’t needed.

    For example, when calling len() in a loop, going l=len, and calling l() in the loop was faster in 3.10. In 3.11, moreso in 3.13, it’s almost a wash.

    However, the author says this:

    Accessing functions through a module [e.g. math.sin()] or a deep attribute chain can still carry overhead. Creating a local alias or using “from module import name” continues to be effective in those situations.

    But when I look at the numbers, I would say 3.13 is pretty close to making it an unnecessary optimization in general. A little subjective on how you interpret the numbers.

    Great info, but this was like trying to use a recipe and reading the author’s life story to get there.















  • I used to have a Dell stick PC that I traveled with to hook up to TV’s in hotels and apartments to stream Netfli, youtube, plex, etc. Worked great for its size and I would hook up a mini wireless mouse and keyboard to control it.

    Look up Stick PC or PC on a stick. You can get windows or Linux variants and I imagine you can change the OS if you work at it.