Reputation
9,820
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
1 21 43
Newest
 Nice Answer
Impact
~504k people reached

Jun
23
comment What is the best aproach for coding in a slow compilation environment
@John: Yeah, a well-written compiler should (IMHO) be I/O bound.
Jun
22
comment How to find bottlenecks in an application?
@ChocoDeveloper: Revisiting this 2 years later. It's like interviewing 10 candidates for a job, versus 1000. With the small number you're going to pay close attention to each one. With the large number you're going to skim, missing important details. That's the trouble with most profilers - it's not the taking of samples, it's the conversion to numbers.
May
15
awarded  Nice Answer
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?
Feb
4
comment Does it matter how I format the name of a function?
@user61852: I had a student once who named his variables after swear words. He was trying to be clever. The compiler didn't care - the program ran fine. But the compiler is not the only reader of the code :)
Feb
4
comment Does it matter how I format the name of a function?
@user61852: It's a case of "when in Rome...". Naming conventions not only help in communicating what you've done to others, but also to yourself. Set the code aside, then come back in 3-5 years, and you'll see what I mean.
Dec
28
answered Is it difficult to develop a programming language which is closely related to human language?