Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Project Euler and Software Optimization (Problem 4 & Palindromes)

#3
Actually, I wondered about this. It wouldn't make much of a difference. It literally records the current time (to the millisecond level) at the start of the script, and then records it as soon as it finds a palindrome. It only tests for the time maybe six or seven times throughout the whole script execution (which maybe adds up to about 0.1 seconds at most). In other words, it does add considerable time for very small tests, but once you start checking 7+ digits, it's neglible compared to the rest.

And what you've mentioned about rust has me wanting to try it. Python is absolutely not the language to be using for this sort of thing. Multithreading and PyPy helped, but it's still python.

Incidentally, I tried out Cython recently. It's python, but you simply have to declare your types for functions and variables. And boy, oh boy, is it faster. On the order of about 20 times faster. It might just be my go-to from here on out. Finna

Reply


Messages In This Thread
RE: Project Euler and Software Optimization - by Lain - February 12th, 2020 at 5:25 AM
RE: Project Euler and Software Optimization - by Darth-Apple - February 12th, 2020 at 5:37 AM
RE: Project Euler and Software Optimization - by Lain - February 12th, 2020 at 6:21 AM
RE: Project Euler and Software Optimization - by Darth-Apple - February 12th, 2020 at 7:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Optimization and You Lain 6 5,577 September 25th, 2019 at 5:46 PM
Last Post: SpookyZalost



Users browsing this thread: 1 Guest(s)

Dark/Light Theme Selector

Contact Us | Makestation | Return to Top | Lite (Archive) Mode | RSS Syndication 
Proudly powered by MyBB 1.8, © 2002-2024
Forum design by Makestation Team © 2013-2024