Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ is still the best choice

Name: Anonymous 2012-01-14 1:10

Are most criticisms of C++ thinly veiled, "it's too hard for me" excuses? All my profs speak highly of C++ and emphasize the importance of learning it to make high performance applications. Stack Overflow seems to like it as well.

Why does 4chan hate it so?

Name: Anonymous 2012-01-15 16:38

>>37
The point is that you don't really have control over memory usage outside static allocation. Modern JVMs are able to perform escape analysis by stack allocation or scalar replacement, for example, yet memory usage is still quite high, and not just because of virtualization.

Name: Anonymous 2012-01-15 17:10

>>41
It's only an issue when dealing with dense large graphs or matrices. By [b large] I mean greater than RAM, and that's my case.

Name: Anonymous 2012-01-15 17:35

>>42

I see. So were you reading portions of the data from a file as you were operating on them? And in seeples you could just buffer your stuff in a fixed data structure to avoid dynamic memory allocations, where in java you probably wouldn't be able to avoid some dynamic memory usage?

Name: Anonymous 2012-01-15 17:40

EXAMINE MY PROSTATE DUBS

Name: Anonymous 2012-01-15 18:43

>>43
Yeah, lots of short living objects, because they'll be replaced by the next chunk from file.

Name: Anonymous 2012-01-15 19:36

>>45

Interesting. If I was in that situation, I think I'd try to implement some method to overwrite the existing objects with the contents of the next chunk of the file. Somehow the file would need to be read directly into a buffer of some kind and then the bytes of the buffer would need to reinitialize your existing objects. I'm not sure how to do something like that exactly in java, but there is probably a way.

Name: Anonymous 2012-01-15 22:03

>>46
Your point is valid, I guess that I could do that with a couple of byte arrays. But I [i already] have a lot of legacy C++ code. So this is a no for now. But surely we'll fix this soon.

Name: Anonymous 2012-01-15 22:35

>>47

yeah, but you never know if it will really do the trick or not. It might be good to do a quick proof of concept using something simple (but pumped up to a massive scale) before investing the work required for making changes. I guess one could try making a 2d point class, writing 10000000 points to a file, and then reading all of them using a new Point2D(scanner); method, and one using a readNextChunkOfPoints(Point2D[] array, FileInputStreamThingyMaBob byteStream); and see if there is actually a difference.

Name: Anonymous 2012-01-16 1:52

I know and understand C++, but it's annoying as fuck to use. It takes long as hell to perform the simplest tasks. I only use it for performance-critical tasks. For everything else, there's always C# or Ruby.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List