[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 718 KB, 300x169, is possible.gif [View same] [iqdb] [saucenao] [google]
4784772 No.4784772 [Reply] [Original]

Don't know if this is the right board but reckon its close.

Computerfags, report in.

1. Languages you know
2. Which one you use the most/favorite

>> No.4784777

jython is the only one i know, but theres a lot you can do with it.

>> No.4784789

Try /g/, though all you'll get from them is how Richard Stallman is god or something along those lines.

>> No.4784799

>>4784772
i figured all the computer scientists and media informatics would be here

>> No.4784801

the script kiddies live at /g/

>> No.4784802

Not a real programmer but:

>1. Languages you know
Python, JavaScript, basics of C++, LOGO (hurr)
>2. Which one you use the most/favorite
JavaScript.

>> No.4784811

1. German, English, Russian, Klingon
2. I love Klingon but it's the least effective language in ordering pizza

gfto, /g/ is that way

>> No.4784814

>>4784811
seems like you're also fluent in "gigantic faggot"

>> No.4784822

FORTRAP

Keeping the legacy alive

program average

! Read in some numbers and take the average
! As written, if there are no data points, an average of zero is returned
! While this may not be desired behavior, it keeps this example simple

implicit none
integer :: number_of_points
real, dimension(:), allocatable :: points
real :: average_points=0., positive_average=0., negative_average=0.

write (*,*) "Input number of points to average:"
read (*,*) number_of_points

allocate (points(number_of_points))

write (*,*) "Enter the points to average:"
read (*,*) points

! Take the average by summing points and dividing by number_of_points
if (number_of_points > 0) average_points = sum(points)/number_of_points

! Now form average over positive and negative points only
if (count(points > 0.) > 0) positive_average = sum(points, points > 0.) &
/count(points > 0.)
if (count(points < 0.) > 0) negative_average = sum(points, points < 0.) &
/count(points < 0.)

deallocate (points)

! Print result to terminal
write (*,'(''Average = '', 1g12.4)') average_points
write (*,'(''Average of positive points = '', 1g12.4)') positive_average
write (*,'(''Average of negative points = '', 1g12.4)') negative_average

end program average

>> No.4784825

python, c++, never had a reason to learn any others

>> No.4784823

C/C++/Python/VB/

>> No.4784842

Java, C#, C, and a bit of Objective-C (I'm still learning Objective-C for a project I'm working on). As far as scripting languages go, I know some PHP, and a tiny bit of Javascript. I'll be learning Lisp next for an AI class I'm taking in the fall. Back in high school, I took a class that was taught in VB, but I don't remember it that well, and I really have no use for it.

I don't have a favorite. I use the language that's best suited for what I'm doing. Knowing how to learn a language quickly, and how to program properly (as well as stuff like data structures) is much more valuable than learning several languages.

>> No.4784855

I want to learn: python, c++, VB, Fortran. What's best order to learn?

Can one learn assembly? I've read that each cpu architecture has its own assembly code.

>> No.4784856

Java, Python, and a small amount of C/C++

Python for quickly writing programs, Java for more complex and larger stuff

>> No.4784871

>>4784772
Python is super simple, i'd start with that.

>> No.4784877

>>4784855
python -> c++

discard the other 2

>> No.4784878

I am beginning fourth year in Computer Engineering this fall and all I know is Java and MATLAB. Feels shit, man.

>> No.4784879

>>4784855

probably C if you're interested in assembly or low level programming

>> No.4784902

ruby is easiest, nice integration of oo and fp. if someone writes a multithreaded jit it'll be perfect.

>> No.4784914

>>4784878

lol'd

>> No.4784926

1. assembly
2. assembly

>> No.4784931

>>4784855
>Can one learn assembly

Uh, yes? I know x86, MIPS, ARM, z80, and 6502.

>>4784879
At some point you'll need to touch assembly. For example: I/O in x86 is done through a special mapping using IN and OUT opcodes. You can of course define them as procs and call them through externs in C, which is what I do. In general, when doing low level programming, try to keep to C as much as possible.

>> No.4784933

1. C#, C++, php, java, free-RPG

2. C#, it's great and fast for windows application and for website

>> No.4784932

English, Python, a little bit of Ruby and Latin, Spanish, and Octave/Matlab (I know enough of Octave to be proficient at Matlab)

>> No.4784940

C + WINAPI
C++
Objective-C, Cocoa
C#
Java
Haskell
Assembly, PE structure
Perl
PHP
Python
Javascript

Currently working on a web crawler and neural networks in Haskell and an iOS app.
Also, I'm loking for a job. Will travel.

>> No.4784946

1. PHP, Perl, C, C++, Java, Scheme, Lua, VHDL, MATLAB + some other specific scripting languages.

2. C++/Lua combo is hard to master, but unbeatable. C++ for raw, powerful stuff and Lua for complex problems. They interface so well with each other it's like there were nearly no boundary between the two, extremely easy to use both in your programs.

>> No.4784948

>1. Languages you know
C++, C, Python, Matlab, Scheme/Lisp, Prolog, Verilog, MIPS, some X86, and Java.
>2. Which one you use the most/favorite
C++ followed C
Matlab if I need to quickly do some math/graphing
>3. Which one you fucking hate the most
Java

>> No.4784951

>>4784855
Always start learning programming with C++.
Fuck VB/Java.
Learn Python/FORTRAN only when you need them

>> No.4784952

C.

I learned to program in C and then realized that people pay me to dump semiconductors into chemicals while wearing dumb-looking white jumpsuits, not to program.

>> No.4784950

Java
C++
C#
VB (embarassingly)
Haskell
Javascript
PHP
Oberon
Favourite is Java

>> No.4784953
File: 50 KB, 500x375, stallman showing us his samurai skills.jpg [View same] [iqdb] [saucenao] [google]
4784953

Currently working on Javascript since I'm new to programming. My friend says Java is a good step forward. Anyone know a good site that has some Java lessons? Is that MIT Intro to Java good enough?

>> No.4784956 [DELETED] 

>>4784946
>VHDL

Do you dream about working as a slave to the US military or just stupid

>> No.4784960

> 1. Languages you know
C++, Java, Fortran77, Perl, Scheme, Prolog, the web basics (HTML, PHP, blah blah blah), a few custom scripting langs, MIPS assembly. Probably some other unimportant ones. BASIC, Python, Haskell....

Also, English, French, Japanese. Used to consider myself fluent in German, but not any more.

> 2. Which one you use the most/favorite
Scheme is beautiful. Prolog works exactly the way I think.

Usually do interfaces in Java.

Those who require us to use Fortran in the modern age are the most debased forces of evil imaginable. I have also never understood the allure of Python. Anything you can do in it, you can do in another language better.

>> No.4784961

>>4784953

The Standofrd one is great, plus all the materials can be found free.

>> No.4784958
File: 188 KB, 800x1100, 2.jpg [View same] [iqdb] [saucenao] [google]
4784958

>> No.4784962
File: 183 KB, 566x690, 1280786169585.jpg [View same] [iqdb] [saucenao] [google]
4784962

>java

I'm disappointed son

>> No.4784971

Java user interfaces? That's like replacing a satellite uplink with smoke signaling.

>> No.4784977

>>4784772
Bash - tolerable
C - good
C++ - great
make - good
Java - good

Depends on the project.

>> No.4784987

>>4784825
this, are you me?

>> No.4784990

c++/Python

Learned c++ during theoretical lnformatics and used accordingly, never really did any "real" programming with it.

I use Python manly, for numerical calculations in physics.

I like it a lot more for this purpose than c++.

>> No.4784994

>>4784990
>Python manly, for numerical calculations
wtf are you doing? use c++ for that shit

>> No.4785002

>>4784994
Python works very well for what we do. Switching to C++ would hardly serve any purpose.

>> No.4785003

Professionally, I use C++ for anything that's above the driver level.

At the driver level, C is more common than C++ because (1) the extra powers of C++ aren't really needed when you mostly just need to flick firmware bits and move bytes around, (2) it's nice to not require libg++ to be installed because it takes up a big chunk of flash space, and, (3) the guy who's writing the driver is usually much more used to using C.

Our development is for small boards that run embedded Linux. (Embedded Linux is very similar to desktop Linux, but everything is replaced with lightweight version -- for example we use busybox instead of bash, we use lighttpd instead of apache, etc.)

The other thing I do a lot is shell scripting, using bash or ash (a clone of bash).

Occasionally I'll use php to put up a web page. Usually this comes up when I have a command-line tool, but somebody wants a "pretty" GUI they can use instead of having to learn how to ssh into my box. So I'll write a little php page that collects their form fields and calls my command-line tool. I just set up a cheapo mini-pc in my office running Ubuntu Server, and voila -- I can write a little GUI front end real fast using php.

>> No.4785005

>>4784958
If you're gonna make a picture comparing cars to programming languages, at least make sensible comparisons. You're simply assigning cars you like to languages you like.
For example, let C be a old-timer race car, where you have to be a mechanic to steer it, and understand the whole mechanism of the car. But if you, the car drives quickly for low cost.
Make Perl be an F1 car. Difficult to drive, but if you can drive it, you're good. Also, one tiny mistake and you're fucked in the butt.
Let JAVA be a modern car with airbags, seat-belts, ABS and speed-limiter.
Let PHP be a handicapped car. You don't even need a license to drive it. Drivers are often bad, but those drivers would not have been able to drive any other vehicle.
Let C++ be a VW Golf. Everyone uses it.
Python a convertable. A language that suits your needs, and that you can show off in.

The analogy has so much potential. But you had to go along and go
>hurr durr I'll assign crappy cars to languages I don't like

>> No.4785008
File: 991 KB, 1280x1920, 1286394084767.png [View same] [iqdb] [saucenao] [google]
4785008

>> No.4785014

>>4784822

Fuck yeah,
fellow fortran on fourchan
fistbump

>> No.4785017

The car analogy clearly describes speed and has depicted it well.

>> No.4785019

>>4785008
This picture has the same issue. Anything that is not a lower level language is depicted as a useless tool.
People that make these pictures probably think they are cool for understand more 'difficult' languages. And think omergerd I know pointers, how do I share my newfound supriority to the world. Without realising that there may be valid reasons to hide some concepts to the programmer.
If I don't have to think about pointers, dereferencing/garbage collection, memory locations, overflows, potential strange dataflows (ie goto), individual bits, then I have more time to think about things that are relevant things, such as concurrency problems, run time complexity, interoperatability, modularity, etc. The latter make a program better, the former may save 5% of the run time.

>> No.4785023

>>4785019
>The latter make a program better, the former may save 5% of the run time.
I agree with everything you said, right up to there. You're wrong here.

>> No.4785026

>>4785023
My point is, at most linear speedup.
An interpreted higher level language will be significantly slower. But there are also compiled higher level languages. They have also very little overhead.

>> No.4785028

>>4785026
Largely agreed. I still suspect that if you're insane on assembly, you could do pretty well. But I'd rather have a program that's 1.5x slower that I can write 100x faster, for most purposes.

>> No.4785035

>>4785028
Let's distuingish between real-time software and all other software.
For real-time software, C++ is probably the best choice, exactly due to the low overhead, and high degree of control the programmer has. Furthermore, real-time software is almost always of low runtime complexit (because it runs realtime), so linear speed ups are relatively important.
But people don't realize that if you are making something different than a real-time system, you don't need more control and less overhead. You need your program to be manegable, modular, concurrent and error-free.

>> No.4785040

>>4784878

>computer engineering
>no assembly
>no c++

what kind of nigerian college do you attend?

on top: c, c++, java, x86 at&t assembly, c#

c# being the fav

>> No.4785037

^^^ spends exponential amount of time on newly coded shit program.

>> No.4785044

>>4785035
>Implying it's very much harder to get modularity, correctness, concurrency, etc., in C++ compared to Java.
Disagreed.

IMHO, the only thing Java has going for it is relative lack of portability problems to its supported platforms, and it's massive standard library, and the large userbase and freely available libraries.

If C++ had the equivalent standard library and freely available third party libraries, I would be so happy. Boost is cool and all, but is no where close.

>> No.4785051

I learned turing in high school does that count?

>> No.4785061

"If C++ had the equivalent standard library and freely available third party libraries, I would be so happy."

Do you seriously need someone to spoon feed you?

>> No.4785073

>>4784772
>Don't know if this is the right board but reckon its close.

It's not.
>/g/

>> No.4785071

>>4785044
It's not harder per se. What I'm saying is that in languages such as JAVA and python, these are the (only) difficult concepts that a programmer needs to be wary of, and spend time thinking about. In C++, you need to worry about dereferencing pointers, pointers in data structures may not be trivial, overflows, the whole list I mentioned earlier.
And of course, keep in mind that C++ is already a higher level language than C, and than machine code.

>> No.4785076

>>4785061
I'm a professional coder, and even in my off time, I enjoy getting shit done, not reimplementing the wheel every god damned time for every goddamned platform.

I enjoy having standard, thoroughly debugged libraries for common tasks. It facilitates programming, especially in large groups.

Now go fuck yourself.

>> No.4785080

>>4785061
This is what is wrong with people like you.
If there is an easy way to improve usability, it should be done.
You are the type of person who puts only one comment in an entire program that others should maintain. And that comment says //It was hard to build, it should be hard to read.

Programming is not about showing off that you can get shit done. It's about getting shit done.

>> No.4785084

>>4785071
Yea, I don't know how C people live with themselves.

The only reason I wouldn't say "C is defunct" is because C++ has exceptions. Then again... embedded compilers usually have options to turn that off, so yea, I think C is largely defunct.

No function overloading? No built-in support for polymorphism? No destructors? Stupid weak type system? No templates? No standard library containers? I don't even...

>> No.4785096

Software Engineering student (4th year)

C, C++, C#, COBOL (lost 10 IQ points in the learning process), Python, Ruby (& RoR), Java (& Java EE), VB.net, PHP, HTML/CSS, Javascript; SQL, PL/SQL

Favorites: C++ & Python
Kill it with fire: Java EE, VB.net, COBOL

>> No.4785093

^^^^ A bunch of babies that don't know how to write and maintain their own library to use.

>> No.4785094

OP here, glad this thread didn't 404 immediately.

I've been dicking around on the Computing /sci/ guide from the sticky and I saw a few C and C++ related guides and whatnot. I suppose I, being a computer science major and all, should learn at least one of them. Would learning C help me with learning C++, or should I ignore C and go straight for C++? From what I understand (i.e, this thread), C++ is way better.

>> No.4785095

>>4785076
>>4785080
>getting shit done
You my bro.

>> No.4785109

>>4785094
For learning purposes, I'd go either C or C++.

I think C++ is much better to get stuff done with, but meh. That opinion is not universal.

I still recognize the "C++ style" is not the best option for embedded systems, device drivers, OSs, etc. Usually w.r.t. exceptions, maybe RTTI, and maybe maybe so called "template code bloat" (in which case just don't use templates). Still, There's a lot that C could use IMHO that C++ has.

>> No.4785106

>>4785096
Why would anyone still learn cobol? Did you have to maintain a system built in cobol?
Also, what's the differense between java and java ee?

>> No.4785129

>>4785106
> Why would anyone still learn cobol? Did you have to maintain a system built in cobol?

When I was in university, the director of my computing department was a former COBOL programmer. The guy was nuts and make hundreds of students suffer.
Moreover, we had to use AS-400 terminals, as our projects were expected to run on it (so we couldn't use emulators ).

A lot of banks have still cobol systems running, and there is a lack of cobol programmers. But IMO it doesn't worth the money, it's a very poorly designed language which makes everything difficult.

> Also, what's the differense between java and java ee?
Java EE means Enterprise Edition, it's the web framework for building web applications in Java.
If you think Java sucks, Java EE takes it to a whole new level.

>> No.4785130

Brainfuck and chef. Also lolcode

>> No.4785142

>>4785129
I know what ee stands for, and what it is intended for.
You listed it as a specific language, so I imagined it's a different language (and not just a bunch of libraries). So what's the difference?

>> No.4785156

>>4785094
Learn both of them.

But keep in mind they are 2 differents languages, despite the fact they share a lot of common mechanisms (most of C code would compile with a C++ compilator).
For example, if you do something the C-way in a C++ application, it would be a huge mistake, because C++ has its own mechanisms which are more convenient once you know how to use them, but a lot of people who already know C doesn't care to learn the specific C++ stuff and end in writing crappy C++ code.

I would suggest learning C++ first, because some very basic stuff like handling keyboard input can be tricky in C, so in C++ you'll be sooner able to write you own little applications.

>> No.4785167

why is programming so hard to get into, it's like slamming my head against a brick wall.

>> No.4785174

C, C++, python, MIPS assembly, PHP, SQL, and bash. What is visual basic, by the way? Is it pretty much just shell scripting in Windows?
Anyways, I like C the most. I'll probably get wrecked by someone, but I just feel more in control of my programming. In my own personal projects, I also like to create my own libraries for them. Sure, don't reinvent the wheel and all that, but fundamentals are still very important, and you may not have the luxury of big libraries on some of the platforms you're developing on. Python is also good when I just want to throw something together quick and dirty. I'd really like to learn perl and one of the functional languages, probably lisp, one day too.

>> No.4785177

>>4785167
i guess it depends what you start with. i started with jython and it was pretty great. none of the commands are too complicated and theres still a lot you can do with it. i guess its sorting of like doing a puzzle, except you create what the puzzle looks like using pieces that you've memorized.

>> No.4785180

>>4785142
Technically, it's indeed just a bunch of libraries.
But it's not only a couple of classes you can use, it's an huge framework and it forces you to adopt a certain structure in your project.
I've done websites using different tools, (PHP frameworks, Ruby on Rails), and Java EE is by far the worst.
You must deal with a lot of configuration in XML files (whereas most moderns frameworks adopt a zero-conf policy), and have to write a lot redundant code (Java bean logic). Moreover, it comes with JSF/JSP for writting views, which are another pieces of crap, especially when dealing with AJAX requests (I would rather go with a distinct separation between views and client code, and use jquery for example).

>> No.4785192

>>4785177
Jython is just the java-written python interpreter, right?
I think the language itself remains Python, regardless it's running on Jython or C-Python (the default interpreter)

>> No.4785201

Dutch, english, latin, greek, german, french, little bit of spanish

>> No.4785226

CSS

>> No.4785280
File: 14 KB, 343x383, 1326168505838.png [View same] [iqdb] [saucenao] [google]
4785280

>>4785192
>Jython is just the java-written python interpreter

a python interpreter inside a java virtual machine running La-La-land byte-code instructions being interpreted back to real world instruction set?

And CS majors wonder why the world looks at them as raving retards.

>> No.4785289

>>4785019
>If I don't have to think about pointers

This is horrible logic. My biggest problem is in Java and the other retarded language is that you can't see what the hell is it doing most of the time.

>> No.4785293

>>4785289
It does exactly what the semantics specifies it does. You can't get it any clearer than that.

>> No.4785295

>>4785280
I know. I guess the point of running python code on Jython is when you cannot deploy the C-Python interpreter, for example on smartphones.

But I've heard the hype is now the Parrot interpreter, basically a virtual machine which can run any interpreted language (python, ruby, perl...), assuming its grammar is provided.

>> No.4785757
File: 25 KB, 450x340, aint even mad.jpg [View same] [iqdb] [saucenao] [google]
4785757

>>4785280
ive never wondered that but alright

>> No.4785786

As a 21 year old whose only experience with programming was two classes in high school that were just intro to visual basic and intro to C++, how difficult would it be to learn a bit of web development?

>> No.4785804
File: 31 KB, 455x290, high-guy_090512022409.jpg [View same] [iqdb] [saucenao] [google]
4785804

i dont know what to do

>> No.4785808

>>4785786

Not that hard, you just have to commit to it.

>> No.4785817

>itt hoards of butthurt, unemployed science majors
Don't feel bad. You just weren't smart enough to pick a real major like the rest of us.
>mfw I majored in CS and got a 80k starting salary immediately after college
>not even joking

>> No.4785825

>>4785817

I am a CS major and you are part of the problem with how people perceive us.

>> No.4785829

>>4785295
Parrot has been the hype for the past 10 years.

>> No.4785837

>>4785829
oops, left my name on. sorry!

>> No.4785845

>>4784772
Computational mathematics fag here

C++, C, C#, Java, MATLAB, Python

>> No.4785852

1. Java, Python, Perl, Octave, Matlab. Dunno why I have been potato enough to never try anything C related
2. I use python and matlab the most

>> No.4785853
File: 17 KB, 246x245, costanza.jpg [View same] [iqdb] [saucenao] [google]
4785853

>VB

>> No.4785863

>>4785853
I'm sick of people like you. Visual Basic is a completely complete programming language. Sure it's not as fast as other languages but it gets the job done.

But you'd rather cling on to whatever tiny little aspect your autistic mind latches on to in order to feed your sense of superiority, I take it.

>> No.4785864

>>4785853
It may not be pretty, but sometimes you just need to make a GUI to track an IP address, and VB gets the job done.

>> No.4785913

>>4784772
English
Spanish
Pig latin

>> No.4785928

>>4784962
It's been many years since Java programs were any slower than C++ or Fortran. In fact, because of JIT optimization, intelligent garbage collection, and the ability to take advantage of caching in ways that other languages don't allow, many equivalent programs will be faster in Java.

>>4785817
When I started my CS degree (in 1999), my TA got hired out of his 4th year to go work for a company in San Francisco. I don't know what his salary was, but his signing bonus was $500k.

>> No.4785942

>>4785928
>It's been many years since Java programs were any slower than C++ or Fortran. In fact, because of JIT optimization, intelligent garbage collection, and the ability to take advantage of caching in ways that other languages don't allow, many equivalent programs will be faster in Java.

I believe this is demonstrably false. Sure, it's less bad, but even trivial programs that should be optimized are not from some of my recent testing of the Sun/Oracle Java 6 JVM.

I admit garbage collection may make certain apps run faster. However, for most apps, it makes the memory usage triple or worse. If you have the memory to spare... then I guess.

And even pure runtime speed on Sun/Oracle's JVM is lacking for simple test cases.

I have yet to seen any compelling larger studies done on this issue, so I have only my own educated opinions to put forth, but they do starkly disagree with you. PS: And this is why CS is an incredibly weak science.

>> No.4786023

>>4785942
> I believe this is demonstrably false.
You are wrong for two reasons.
1) Trivially, you couldn't ever prove that every possible program in Java is inferior to its C++ counterpart; and
2) It's true.

I know this because my research group (theoretical physics + chemical dynamics) wanted to port our code to Java for ease of development. We figured that even if it was a bit slower, the shorter development cycle would make it worthwhile. So we were surprised when our Java code started outperforming both C++ and Fortran for several applications.

When you create/destroy a lot of heap objects, Java is superior (though obviously this depends on your compiler/interpreter). C++ requires a lot of context switching and paging when destroying objects, assuming you're allocating in the constructor and deallocating in the destructor. Java, on the other hand, tends to do deallocations in clumps, which is more efficient.

It also (semi) intelligently compiles your code in real-time. So the first couple of times through a loop with a lot of internal branches and method calls, you pay a penalty. But once you're through that, Java devotes some energy to optimizing and inlining, and from then on performs at least as well as C++. Some programs just can't be statically profiled.

I was at a conference a few months after porting our code over (this was probably 2008 or so), and a physicist gave a talk on just this subject, with the same conclusions. So it's not just me discovering it. He also suggested the caching issues idea, which I went back and discovered to be true, especially with comparison to Fortran.

>> No.4786072

OP:
Java, C, C++, Objective-C, Python, PHP, Visual Basic

I use Java whenever I can, with a couple exceptions:

As previously mentioned, Visual Basic makes it really easy to hack together a simple Windows GUI application that needs to do a lot of talking to the operating system (i.e. network, mouse, serial I/O, etc). You wouldn't want to use it for a large program though.

I use C when I absolutely have to get close to the metal, for example microcontrollers or really, really performance-critical stuff.

>> No.4786077

Matlab, some C, and does Mathematica (or LaTex) count? lol Physicsfag here

>> No.4786083

c/c++

>> No.4786087

1. C++, java
2. No.

>> No.4786094

>>4786023
>When you create/destroy a lot of heap objects, Java is superior (though obviously this depends on your compiler/interpreter). C++ requires a lot of context switching and paging when destroying objects, assuming you're allocating in the constructor and deallocating in the destructor. Java, on the other hand, tends to do deallocations in clumps, which is more efficient.

Yes and no. Whatever you do in Java you can do in C++ in this regard. If you want to rip on the existing malloc implementation, sure, but there's nothing stopping you from using hoard allocator or something.

Also apples to oranges, because in any well written C++ program, compared to its well written Java counterpart, you'll have less dynamic memory allocation because of the ability for stack objects, and because of base class sub-objects and member sub-objects need not be separately allocated.

>It also (semi) intelligently compiles your code in real-time. So the first couple of times through a loop with a lot of internal branches and method calls, you pay a penalty. But once you're through that, Java devotes some energy to optimizing and inlining, and from then on performs at least as well as C++. Some programs just can't be statically profiled.

Which JVM are we talking? Sun/Oracle's Java 6 VM can't even bother inlining ArrayList function calls to make it as fast as the built-in array version from my testing.