On 6/24/07, Jeni Zundel <[EMAIL PROTECTED]> wrote:
1. Is the java significantly slower than the perl script because I suck at writing efficient java code or because perl is just really that much better at string manipulation?
Yes. If it's important to determine how much of your slowdown is due to a poor algorithm, how much due to a poor implementation, and how much due a poorly-designed JVM, you could spend a few weeks coding and benchmarking and testing, of course. Or you could spend an hour or two trying to convince your manager that it's sufficient to have a fast Perl program on the job today, because you have a slow Java program on standby in case we all forget Perl tomorrow.
2. Does anyone know if the java would be significantly improved if I make use of regex instead of using substring functions?
Why do you ask this question in a Perl forum? Yes, Perl is great at string manipulation; but you have your Perl program, you're happy with it, it's your Java code that you're wondering about improving. If you ask the Java people, they can give you better answers about improving your Java code. And they're especially eager when they hear that Java needs help to compete against Perl. Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/