This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
manolis tsamis wrote:I am currently using that but because it's repeated million times modulus is slowing it down... I was searching for another thing to do
Are you absolutely sure that it's the modulus that's slowing you down? Most attempts at efficiency end up focusing on the wrong thing, so you'd better be able to prove that its the '%' that's causing all your problems before you start looking for a "better %".
That said, there are faster ways of doing it, the most basic being if d (your divisor) is a power of two:
x % d == x & (d-1)
but you'd better be awfully sure it's going to help before you start littering your program with arcane crap like that.
Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com