Reputation
10,168
Top tag
Next privilege 15,000 Rep.
Protect questions
Badges
1 23 44
Impact
~579k people reached

May
8
comment How does modulus work?
To answer your question, there is an integer division instruction, which produces both a quotient and a remainder, and the modulus is just the remainder. But pay attention to @uesp comment. The division takes around 1e-9 seconds, even if the compiler hasn't precalculated it (which in this case it has). The cout << takes around 1e-3 seconds, so this is like trying to weigh a hair by weighing the Bison who owns it.
May
5
revised When designing a replacement application, how can I compare its performance to the original, if there are no existing statistics?
added 286 characters in body
May
5
revised When designing a replacement application, how can I compare its performance to the original, if there are no existing statistics?
added 252 characters in body
May
5
revised When designing a replacement application, how can I compare its performance to the original, if there are no existing statistics?
added 73 characters in body
May
5
answered When designing a replacement application, how can I compare its performance to the original, if there are no existing statistics?
Apr
28
comment List comparing techniques for faster performance
+1 @cap7: This is what I would do - sort both lists and use a merge loop. You're not clearing the lists, just indexing through them.
Mar
26
comment Does code generation increase the code quality?
@gbjbaanb: I agree. That's why I said enough flexibility. To me, the issue is not the code generator itself, but the domain-specific-language that serves as its input. If that DSL is too flexible, the user has to swim around in options. If it is not specific enough, the user has to work around its limitations. I can give examples of these.
Mar
17
comment Writing Z80 table based assembler/disassembler
Unless you are running this on a tiny machine, you don't really need to worry about storage size of the table.
Feb
15
awarded  Good Answer
Feb
5
revised Is there a name for the problem of representing state twice and then getting out of sync?
added 12 characters in body
Feb
5
comment Is there a name for the problem of representing state twice and then getting out of sync?
@JimmyHoffa: Thanks. I guess I'm a bit of an outlier sometimes, but I am impressed with the fact that there are some really talented and helpful people on these sites.
Feb
5
comment Is there a name for the problem of representing state twice and then getting out of sync?
@JimmyHoffa: I use events at low frequency, like once in a while just do a regeneration, but for high frequency messages are just too likely to get dropped or duplicated. Plus, often they are self-cancelling like "insert X", then "oops, don't". Plus, notifications get buried in classes, and they can easily go wild, soaking up CPU.
Feb
5
revised Is there a name for the problem of representing state twice and then getting out of sync?
added 199 characters in body
Feb
5
answered Is there a name for the problem of representing state twice and then getting out of sync?
Dec
28
answered Is it difficult to develop a programming language which is closely related to human language?
Dec
17
comment When should we work on GC optimization?
If you want to save time in GC, first save time in new. This illustrates the method I use, which works in any language. You could well find that you are doing news that could be avoided, such as by re-using old objects rather than making new ones.
Nov
29
awarded  Nice Answer
Nov
11
awarded  Peer Pressure
Nov
10
comment Finding common prefixes for a set of strings
@cruppstahl: Sorry, I understand you want just one level, but I have a hard time understanding why.
Nov
10
comment Finding common prefixes for a set of strings
@cruppstahl: Check my edit above. That should work for any content.