If you’re reading a random diatribe on whether C and C++ are good for numerical computing and happen to come across the curious expression “teaching your grandmother to suck eggs”, and decide to learn more about it, you’ll quickly find references to early usages in the 1749 Henry Fielding novel, Tom Jones, in which the protagonist recounts:
I remember my old schoolmaster, who was a prodigious great scholar, used often to say, Polly matete cry town is my daskalon. The English of which, he told us, was, That a child may sometimes teach his grandmother to suck eggs.
And if you then think to yourself, what the heck is “Polly matete cry town is my daskalon”? you need only grab your handy copy of William Shepard Walsh’s 1909 Handy-book of literary curiosities, look up “Polly matete” in the index, and find that it’s the transliteration (transphoneticization?) of:
πολλοι μαθηται κρειττονες διδασκαλον
which is the last line of a Greek epigram attributed “sometimes to Phillippus of Thessalonica, sometimes to Lucilius (both of whom lived in the early days of the Roman Empire)”, translated as:
Hermes, the volatile, Arcady's president, Lacquey of deities, robber of herds, In this gymnasium constantly resident, Light-fingered Aulus bore off with these words: Many a scholar, by travelling faster On learning's high-road, runs away with his master.
So there you go. And if you’re wondering what the original phrase means, Walsh provides this helpful explanatory rhyme:
Teach not a parent's mother to extract The embryo juices of an egg by suction: The good old lady can the feat enact Quite irrespective of your kind instruction.
As a side note, Whisper now supports poems, and I just learned how to type Greek in Ubuntu.
William Morgan wrote:
If you’re reading a random diatribe on whether C and C++ are good for numerical computing and happen to come across the curious expression “teaching your grandmother to suck eggs”, and decide to learn more about it, you’ll quickly find references to early usages in the 1749 Henry Fielding novel, Tom Jones, in which the protagonist recounts: bq. I remember my old schoolmaster, who was a prodigious great scholar, used often to say, Polly matete cry town is my daskalon. The English of which, he told us, was, That a child may sometimes teach his grandmother to suck eggs. And if you then think to yourself, what the heck is “Polly matete cry town is my daskalon”? you need only grab your handy copy of William Shepard Walsh’s 1909 Handy-book of literary curiosities, look up “Polly matete” in the index, and find that it’s the transliteration (transphoneticization?) of: bq. ???? ?????? ???????? ???????? which is the last line of a Greek epigram attributed “sometimes to Phillippus of Thessalonica, sometimes to Lucilius (both of whom lived in the early days of the Roman Empire)”, translated as:
So there you go. And if you’re wondering what the original phrase means, Walsh provides this helpful explanatory rhyme: As a side note, Whisper now supports poems, and I just learned how to type Greek in Ubuntu.I notice that the guy who wrote said random diatribe, despite quoting the oft repeated sadistic about FORTRAN compiling to faster code than C, doesn’t actually include a FORTRAN timing result in his series of numbers.
I was under the impression that modern C++ compilers, proper use of templates (and avoidance of overusage of C++’s inheritance based polymorphism) could create numerical code “on par with” FORTRAN.
For what its worth, comparing C/C++ to FORTRAN for numerical code (or “codes” if you are a Fortran programmer) is a subtle and tricky issue. It is true that using most implementations of the BLAS library will beat hand-coded matrix operations in C. But BLAS isn’t written in FORTRAN. Last I checked ,the best BLAS implementations were still hand-coded in assembler by some Japanese guy with the ironic last name of “Goto”. BLAS also has C bindings in addition to FORTRAN bindings, and will probably make your numerical code execute much faster than either pure C or, for that matter, pure FORTRAN with any compiler I’ve used.
The rest of his numbers match my experience, with two caveats 1) I can’t comment on the OCaml number 2) His C++ number makes me suspicious of his C++ coding style. 3) Any “foo is bar times as fast as C code” statement should be viewed with suspicion. I’ve written C code thats many times slower than equivalent C code in the past.
Ironically, just as word might be finally getting around that “Hey, FORTRAN is no great shakes, even for numerical code(s)” we are reaching a future where C is equally ridiculous for reasons of parallelism.
Personally I’d be quite happy if all the numerical programmers in the world switched to OCaml : my stance on the “C++ vs. FORTRAN for numerics” debate is “anti-FORTRAN” rather than “pro-C”. In particular, FORTRAN77 is an abominable language. Unless you spend more time waiting for your code (“codes” if you’re a physicist) to run than you do debugging it, there is no way that any hypothetical difference in speed justifies F77.
Also : Dear physicists, please stop copying your coding style from those “numerical recipes in XXX” books. Thanks.
See Also: http://users.soe.ucsc.edu/~mds/numerical_packages.html http://www.oonumerics.org/blitz/