Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
time complexity of int
#7
there is a formula to do multiply based on squaring. but it has to do 2 squares so it won't help unless the exponent is improved or the constant change is more than half lower.

many years ago i wrote some mainframe machine code to do 16-bit multiply by doing squaring with lookup tables. my code ran in 0.75 of the time needed by the machine instruction that does 16-bit multiply. i vaguely recall a way to improve division, too, but it only gains on really big numbers.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
time complexity of int - by Skaperen - Jul-03-2020, 11:18 PM
RE: time complexity of int - by casevh - Jul-04-2020, 08:28 PM
RE: time complexity of int - by Skaperen - Jul-05-2020, 12:08 AM
RE: time complexity of int - by casevh - Jul-05-2020, 05:06 AM
RE: time complexity of int - by Skaperen - Jul-05-2020, 05:58 AM
RE: time complexity of int - by casevh - Jul-05-2020, 03:03 PM
RE: time complexity of int - by Skaperen - Jul-05-2020, 06:02 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Time complexity different between operating systems. Why? Mekire 2 4,300 Jan-18-2017, 09:29 PM
Last Post: casevh

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020