markuskidd
|
 |
«
Reply #30 - Posted
2003-04-09 19:21:21 » |
|
since there is only your short comment at the bottom, i think if you put some more expanation in there as another comment it's going to be pretty visable..
|
|
|
|
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
shawnkendall
|
 |
«
Reply #33 - Posted
2006-02-15 14:38:08 » |
|
Hi all, Well I got a special email in my inbox today. "The following bug(s) that you are watching in the Bug Database have been updated. To view their details, please visit the following urls: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4820062Updated field(s): Category" If you check it, it now says: Bug ID: 4820062 Votes 318 Synopsis Provide "struct" syntax in the Java language Category java:classes_nioWOO-HOO congrats to EVERYONE who voted and/or cared. Nice job Princec, it's been a long time, but there ya go :-) --------------------- Hmmm, after careful review, I may have jumped the gun on this. The category changed, but that doesn't mean it's going to production so to speak. :-( Just that it's actively being research, I s'pose that's a good thing, but not THE good thing I thought it was. Tape at 11am....
|
|
|
|
c_lilian
Senior Member    Projects: 1
Java games will probably rock someday...
|
 |
«
Reply #34 - Posted
2006-02-15 14:44:24 » |
|
unfortunately not for mustang (may be dolphin)  Lilian
|
|
|
|
swpalmer
|
 |
«
Reply #35 - Posted
2006-02-15 16:48:13 » |
|
Nice to see that it is getting some attention. I think they are really on the right track now. NIO with annotations should be a great way to deal with this. I wonder if it will lead to something like an ObjectBuffer (much like the primitive-based IntBuffer, DoubleBuffer etc.) 1 2 3 4 5 6
| ByteBuffer bb = ByteBuffer.allcoateDirect(size); ObjectBuffer<StructThing> objBuf = bb.asObjectBuffer(StructThing.class); ... StructThing s = objBuff.get(0); ... |
|
|
|
|
shawnkendall
|
 |
«
Reply #36 - Posted
2006-02-15 20:05:42 » |
|
Post that idea to the comments, or te discussion thread Cas mentions in his opening remarks...
|
|
|
|
swpalmer
|
 |
«
Reply #37 - Posted
2006-02-16 01:30:23 » |
|
done.
We should write a pure Java reference implementation that makes an ObjectBuffer and uses annotations to determine the offsets of the fields. It would be slow but it might serve to get the point across better.
|
|
|
|
princec
|
 |
«
Reply #38 - Posted
2006-02-16 12:43:37 » |
|
That's precisely the way forward. The idea is that the VM (or classloader, or combination of both) can then use annotations and intrinsify the code at runtime into ultrafast memory access. Cas 
|
|
|
|
Spasi
|
 |
«
Reply #39 - Posted
2006-02-16 13:02:20 » |
|
I came across something interesting this morning. You already know how to use libraries (jar files) when compiling, now as annotation processing is a part of any Java compiler, libraries can use annotation processing and automatically generate boiler-plate code for you. A possible example of this is RFE 4820062. I plan to elaborate more on this in a future entry.
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
princec
|
 |
«
Reply #40 - Posted
2006-02-16 15:07:17 » |
|
I posted on his blog; hopefully will be able to discuss with him about our use-cases and the implementation. Cas 
|
|
|
|
Spasi
|
 |
«
Reply #41 - Posted
2006-02-21 13:29:29 » |
|
Have you seen the latest evaluation update? So do us a favor and let us know what is wrong with the performance of the java.nio buffers if it doesn't meet your needs. That is a realistic way of solving your problems. Asking for C structs is not.
|
|
|
|
|
Riven
|
 |
«
Reply #42 - Posted
2006-02-21 14:10:36 » |
|
So do us a favor and let us know what is wrong with the performance of the java.nio buffers if it doesn't meet your needs. That is a realistic way of solving your problems. Asking for C structs is not. A reply with such attitude is hard to believe to be official from Sun. Yet it is... it sounds like somebody took a personal offense regarding this request. And we're not even asking for C-structs. A StructBuffer or an ObjectBuffer is a whole different thing, the only thing they share is the name, which might be the most important reason it gets so much hostile reactions.
|
|
|
|
Mr_Light
|
 |
«
Reply #43 - Posted
2006-02-21 15:05:20 » |
|
Have you seen the latest evaluation update? So do us a favor and let us know what is wrong with the performance of the java.nio buffers if it doesn't meet your needs. That is a realistic way of solving your problems. Asking for C structs is not. I'd post a new artikel, forget about the votes adleast theres clarity then and just post a link to it in a comment. It seems sun is getting lost in the 4 pages of comments.
|
It's harder to read code than to write it. - it's even harder to write readable code.
The gospel of brother Riven: "The guarantee that all bugs are in *your* code is worth gold." Amen brother a-m-e-n.
|
|
|
princec
|
 |
«
Reply #44 - Posted
2006-02-21 15:09:44 » |
|
It's a reply typical of someone not directly involved in the problem domain. Unfortunately so few people are ... chicken an egg situation: nobody uses Java for this stuff because it's such a pain and a lot slower than C, so there are no people with a problem... ...I am corresponding with Peter von der Ahé, who I believe is a VM engineer, on the subject. I will CC Jeff K. in on it because he understands what the RFE is about. Cas 
|
|
|
|
blahblahblahh
|
 |
«
Reply #45 - Posted
2006-03-06 01:03:50 » |
|
Since I'm far too lazy to maintain a proper website at the moment...I wrote an impromptu monologue the other week on structs, at far too late/early in the morning. Might be crap. Seemed to make sense at the time  . http://protopage.com/a-d-a-m (click the number 2 in bottom right corner)
|
malloc will be first against the wall when the revolution comes...
|
|
|
ryanm
« League of Dukes » Senior Member    Projects: 1
Used to be bleb
|
 |
«
Reply #46 - Posted
2006-03-06 11:24:29 » |
|
I cannot for the life of me find this number 2 that you refer to. Any chance of more hints?
|
|
|
|
|
princec
|
 |
«
Reply #47 - Posted
2006-03-06 11:34:25 » |
|
Me either. Page doesn't even display at all in Opera 8.5... Cas 
|
|
|
|
blahblahblahh
|
 |
«
Reply #48 - Posted
2006-03-06 11:57:34 » |
|
Gah. Don't know what happened - probably I had it open on another window too, and closed the windows in wrong order after I'd made page 2 visible, causing it to re-hide the second page (makes it private). Fixed now.
|
malloc will be first against the wall when the revolution comes...
|
|
|
|
|
Orangy Tang
|
 |
«
Reply #50 - Posted
2006-03-06 13:39:41 » |
|
Horrible website aside, that was getting quite interesting to read but then seemed to stop only halfway though and without actually making any kind of point. 
|
|
|
|
blahblahblahh
|
 |
«
Reply #51 - Posted
2006-03-06 14:56:56 » |
|
Horrible website aside, that was getting quite interesting to read but then seemed to stop only halfway though and without actually making any kind of point.  Yeah, I just noticed that too. I have a horrible feeling I just got bitten by a POST form limit on a J2EE server. Grr. PS: horrible website == why I said I was being lazy. Not my site, just a place where I can conveniently login and edit a webpage on the fly through my browser. It's not intended to be used for this, but I'm having server + domain issues I haven't got time to fix right now 
|
malloc will be first against the wall when the revolution comes...
|
|
|
princec
|
 |
«
Reply #52 - Posted
2006-03-07 12:13:10 » |
|
Why not post the rant ok a wiki? Cas 
|
|
|
|
chronos
Senior Newbie 
|
 |
«
Reply #53 - Posted
2006-03-09 11:38:26 » |
|
Hello everyone.
Just wondering if were going to see structs in mustang or dolphin?
Thanks
|
|
|
|
|
Riven
|
 |
«
Reply #54 - Posted
2006-03-09 13:28:52 » |
|
Definitly not in Mustang
|
|
|
|
chronos
Senior Newbie 
|
 |
«
Reply #55 - Posted
2006-03-09 13:34:55 » |
|
I'm guessing that means we're all going to have to wait a long long time...
|
|
|
|
|
princec
|
 |
«
Reply #56 - Posted
2006-03-09 14:16:14 » |
|
There are rumours about it making it into Java 7 but don't hold your breath. Cas 
|
|
|
|
chronos
Senior Newbie 
|
 |
«
Reply #57 - Posted
2006-03-09 14:45:51 » |
|
How much faster could it make lwjgl if we had it?
|
|
|
|
|
Riven
|
 |
«
Reply #58 - Posted
2006-03-09 16:22:11 » |
|
It has little to do with LWJGL, and it depends on your bottleneck anyway. If your bottleneck is fillrate then it won't help a single bit.
If you buy a harddisk that's twice as fast as your current one, how much faster does that make your browser?
The "structs" will however be about as fast as field-access (if they implement it right), without the overhead of creating, storing and garbage-collecting of each object.
|
|
|
|
princec
|
 |
«
Reply #59 - Posted
2006-03-09 17:44:06 » |
|
Not strictly true, there will always be at least one object, but my idea is to have it able to slide around inside a ByteBuffer like a window. It's not like the "lightweight objects" proposals that IBM and some mathematical fraternities have been espousing. It will speed up LWJGL a fair amount if you do a lot of vertex pushing - behind fillrate, geometry transfer and processing is the other big bottleneck in 3D. I suspect scenegraphs like Xith and jME will benefit by a few fps with structs - and there's a good chance there are some opportunities to save a few megs of RAM in object overhead too. Not to mention the code will be greatly simplified. Cas 
|
|
|
|
|