Hello, i would like to ask you for help.
I did program which decomposing numbers into prime numbers. Everything works but if i have input for example 500 random numbers its slower then it should.
In one part of my task i get a lot of primes (500) and my program doesnt check it in time.
Any suggestions how to make it faster? ( it has to work for other inputs like number 991350783547)

Thx for help.

Code : https://github.com/Elfkam/Elf/blob/master/Primes