prime_numbers/README.md
2025-02-26 16:35:19 +01:00

940 B

Prime faztorization using IDLE timer

This is a simple GUI application project written in C++ with the Qt toolkit. This application is able to run a prime factorization algorithm on given number, showing the individual factors that make up the number (if any - e.g. number is already prime).

The focus of this project is not to make a particularly efficient prime factorization algorithm, rather, to demonstrate the usage of an IDLE time (0 tick timer), to perform the long-running operation of prime factorization, without it freezing the program.

IDLE timer is a way to have the computation run in every cycle of the event loop, but only for a single (or a set number of) iteration(s). This means the program will still appear responsive as the event loop is being re-ran. Note that this does rely on splitting up the computation, with that single iteration itself being fairly quick.

An alternative solution would be using threads.