9,762 reputation
12143
bio website en.wikipedia.org/wiki/…
location United States
age 70
visits member for 4 years, 8 months
seen 2 days ago

BS Mechanical Engr.
PhD CS(AI)
CS Prof (4yr)
Numerous consulting jobs.
15 yr at http://www.pharsight.com
Published book on CS & several articles
4 kids, 2 grand
Pilot(student)

P.S. The picture is a Beta-prime distribution. It shows the program speedup factors you can get if you see a problem twice in 2, 3, 4, and 5 samples.


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.
Feb
2
comment What questions do you ask about a company before deciding to work there?
@user1172763: Right. That consideration is taught in business schools. Now consider yourself a contractor brought in to straighten out some mess, developing a relationship with the employees, paying for your own health insurance, etc. You go above and beyond the call of duty. Then when you submit a reasonable bill for the time you worked, they sit on it for 6 or 8 weeks, expecting you to be their banker. So who is it they care about? Do you want to work for them?
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.