Wade, I showed this to a skilled PHP programmer I know since this is the only comparison of the two languages I've seen.
She tells me that array_key_exists() is slow as it searches the whole array and that the faster isset() can be used instead. Cheers, David --- Wade Bowmer <[EMAIL PROTECTED]> wrote: > I recently had cause to test out some check-digit > algorithms for a webapp. > For various reasons, I did these experiments in > Icon. The test involved > calculating a check-digit for several million > numbers in sequence and > tabulating the statistical spread. Icon was perfect. > > However, the webapp in question is in PHP. So in a > spirit of curiosity, I > rewrote the test program (about 70 lines) in PHP and > did some simple tests. > I was surprised to discover that the Icon version > was something like three > times as fast as the PHP version! (Both languages > were compiled from source, > BTW.) > > What's nearly as important is that I wrote the thing > in the "obvious" way, > so there were no fancy Icon tricks. The only two > things that were a bit > messy to translate were two every clauses and some > is-not-null operators in > the setup. > > If you're curious, you can get the two programs here > > http://yceran.org/~wwb/icon/custno.tar.bz2 (~1.5k). > > Wade. > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- > Interactive Reporting > Tool for open source databases. Create drag-&-drop > reports. Save time > by over 75%! Publish reports on the web. Export to > DOC, XLS, RTF, etc. > Download a FREE copy at > http://www.intelliview.com/go/osdn_nl > _______________________________________________ > Unicon-group mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/unicon-group > ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Unicon-group mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/unicon-group
