Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: [joist-dev] Re: [joist-cvs] CVS update: joist/java/org/joist/database UserManager.java

Project highlights: Architectural Overview

joist
Discussion topic

Back to topic list

Re: [joist-dev] Re: [joist-cvs] CVS update: joist/java/org/joist/database UserManager.java

Author edk
Full name Ed Korthof
Date 2000-09-27 21:58:02 PDT
Message On Wed, 27 Sep 2000, Daniel L. Rall wrote:

> Okay guys, I ran the numbers (bytes):
>
> Before After
> ------ -----
> javac: 8776 8728
> jikes: 8533 8504
>
> Java compilers are not on par with gcc, unfortunately. I'm with you in
> spirit. At the same time, it could be argued that you should know what
> executeUpdate() returns. Shame on you! ;) j/k!
>
> Anyhow, it's a minor nit. Know that I understand trading resources for
> maintainability, and appreciate everyone's vigilance. :)

You're right -- I tried a simple test, and the byte code is indeed
different -- if you store the results in a register, you get two extra op
codes : istore_1 and iload_1. (javap -c produces interesting output,
fwtw.) That's annoying.

I'd say that as an efficiency issue, the difference is utterly irrelevant.
But I am fine with your change. Perhaps I should know executeUpdate --
but it's also true that there's an error message which tells me what the
code is supposed to be checking. Given that, one could argue that the
shorter form is equally easy to understand (fewer distractions can be
good).

OTOH -- so long as we're working in Java, I'm going to keep arguing that
we should value readability above certain kinds of optimizations. ;-)

thanks --

Ed
--
   +=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=
   | Ed Korthof | edk at collab dot net | 415-247-1690 |
   +=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=

« Previous message in topic | 5 of 6 | Next message in topic »

Messages

Show all messages in topic

Re: [joist-cvs] CVS update: joist/java/org/joist/database UserManager.java edk Ed Korthof 2000-09-26 08:55:29 PDT
     Re: [joist-dev] Re: [joist-cvs] CVS update: joist/java/org/joist/database UserManager.java brian Brian Behlendorf 2000-09-26 10:01:53 PDT
     Re: [joist-dev] Re: [joist-cvs] CVS update: joist/java/org/joist/database UserManager.java David Pellegrini <davidp at collab dot net> David Pellegrini <davidp at collab dot net> 2000-09-27 00:39:31 PDT
     Re: [joist-dev] Re: [joist-cvs] CVS update: joist/java/org/joist/database UserManager.java dlr Daniel Rall 2000-09-27 01:06:48 PDT
         Re: [joist-dev] Re: [joist-cvs] CVS update: joist/java/org/joist/database UserManager.java edk Ed Korthof 2000-09-27 21:58:02 PDT
             Re: [joist-dev] Re: [joist-cvs] CVS update: joist/java/org/joist/databaseUserManager.java dlr Daniel Rall 2000-09-27 22:02:31 PDT
Messages per page: