Prev: How to get an include-path of jni.h that is able to be differenton different platforms.
Next: Read utf-8 file return utf-16 coding hex string ?
From: Roedy Green on 1 Feb 2010 07:45 On Thu, 28 Jan 2010 23:53:01 -0800 (PST), Sanny <softtanks22(a)hotmail.com> wrote, quoted or indirectly quoted someone who said : >I have a Java Applet which is quite slow. > >There are a few functions that are called by the Java Applet. I want >those functions to be run as fast as possible. > >One Option is to use Native Support. jni and applet together are a nightmare. It is much easier to use Java Web Start and JNI. See http://mindprod.com/jgloss/jni.html http://mindprod.com/jgloss/javawebstart.html -- Roedy Green Canadian Mind Products http://mindprod.com Computers are useless. They can only give you answers. ~ Pablo Picasso (born: 1881-10-25 died: 1973-04-08 at age: 91)
From: Keith Thompson on 1 Feb 2010 11:15 Arved Sandstrom <dcest61(a)hotmail.com> writes: > Keith Thompson wrote: [...] >> The lesson, I think, is that you have to be very careful even with >> (or especially with) seemingly fundamental and obvious terms like >> "object", "variable", and so forth. They can have different meanings >> in different contexts. The meaning of "object" in C and C++ is >> clear and unambiguous. The meaning of "object" in Java is likewise >> clear and umambiguous. They're just very different meanings. >> > Maybe I'm missing something here, but I fail to see how the meaning of > "object" is all that different between C++ and Java. In both cases > it's an instance of a class, which means they are also regions of > storage. No, an "object" in C++ can be of any type, not just of a class. By definition, in C++, "An object is a region of storage" (section 1.8 of the C++ 2003 standard). As I said, the C++ definition is similar to the C definition: "region of data storage in the execution environment, the contents of which can represent values (C99 3.14). Perhaps the meaning of "class" is different in Java? (After a *very* a quick at the Java language specification, I don't think so; it seems to refer only to types declared with the "class" keyword.) In C++, "classes" are a particular subset of types. For example, int is not a class, but instances of type int are objects. In Java, as I understand it, an instance of type int is not an "object", because int is not a class. [...] I understand that the word "object" is widely used to refer to an instance of a "class", but that meaning is not universal.n -- Keith Thompson (The_Other_Keith) kst-u(a)mib.org <http://www.ghoti.net/~kst> Nokia "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"
From: Phil Carmody on 1 Feb 2010 15:32 Lew <noone(a)lewscanon.com> writes: > Keith Thompson wrote: .... > You really should expand your study. Start with the Wikipedia > definition, perhaps read Grady Booch. Being a C programmer is not a > good excuse. In fact, it's no excuse at all. Keith, no! Please don't do it! Friends don't let friends read Grady Booch. Phil -- Any true emperor never needs to wear clothes. -- Devany on r.a.s.f1
From: Arved Sandstrom on 1 Feb 2010 17:49 Keith Thompson wrote: > Arved Sandstrom <dcest61(a)hotmail.com> writes: >> Keith Thompson wrote: > [...] >>> The lesson, I think, is that you have to be very careful even with >>> (or especially with) seemingly fundamental and obvious terms like >>> "object", "variable", and so forth. They can have different meanings >>> in different contexts. The meaning of "object" in C and C++ is >>> clear and unambiguous. The meaning of "object" in Java is likewise >>> clear and umambiguous. They're just very different meanings. >>> >> Maybe I'm missing something here, but I fail to see how the meaning of >> "object" is all that different between C++ and Java. In both cases >> it's an instance of a class, which means they are also regions of >> storage. > > No, an "object" in C++ can be of any type, not just of a class. By > definition, in C++, "An object is a region of storage" (section 1.8 of > the C++ 2003 standard). > > As I said, the C++ definition is similar to the C definition: "region > of data storage in the execution environment, the contents of which > can represent values (C99 3.14). > > Perhaps the meaning of "class" is different in Java? (After a *very* > a quick at the Java language specification, I don't think so; it > seems to refer only to types declared with the "class" keyword.) > In C++, "classes" are a particular subset of types. For example, > int is not a class, but instances of type int are objects. In Java, > as I understand it, an instance of type int is not an "object", > because int is not a class. > > [...] > > I understand that the word "object" is widely used to refer to an > instance of a "class", but that meaning is not universal.n > Education received. :-) Although I stand by what I said if we restrict ourselves to classes. AHS
From: Antoninus Twink on 2 Feb 2010 15:11
On 31 Jan 2010 at 4:07, Arne Vajhøj wrote: >> When I tried this, about six or seven years ago (with the original >> intent of putting the program into production), it was 50-60 times >> slower than C (admittedly for a heavily recursive application). > > That is not in any way typical. > > It is completely off the scale for unlikelihood. > > But if I remember correct from last time you gave the story, then you > can not explain exactly what the code did. Richard Heathfield is a notorious comp.lang.c fantasist. It is obvious that he has never done any programming work in the real world - no shop I've ever known would tolerate his truculent attitude and his prissy refusal to step beyond a purely academic view of language purity and get his hands dirty with pragmatic code that might actually work. |