[fulfilled] Forum search

Hi,

Forum search doesn’t seem to work very well, and google doesn’t turn up any pages on java-gaming.org for some reason - I heard that’s because google is locked out of the forum somehow. Maybe someone could flick the switch and let google index/search java-gaming.org?

For example I can’t find the Bag.java code that I remember someone made a few years ago which is like an ArrayList but it’s unordered and quicker for deletions…

If anyone has it that’d be handy :slight_smile:
Thanks,
Keith

Thar she blows!. I agree that the search could be better, probably easiest just to let google in.

Thanks a lot Bleb and Riven for the links, very handy! 8)

Bleb, for some reason the source code link/attachment on reply 51 here (http://www.java-gaming.org/index.php/topic,14938.msg119747.html#msg119747) seems to be broken - 404 error. I know it’s not your link, the forum seems to have lost it…

Old attachments get deleted maybe? I don’t have the code anymore at any rate, I’d just use Riven’s.

edit: Continuing my campaign of pilferage from Riven, find attached his Bag code, but altered to include the stuff (javadoc, type safety warnings) that my ultra-prissy Eclipse setup warns me about.

It’s probably much faster to do:

T[] arr = (T[])new Object[size];

Done

For me and a stupid microbenchmark the bag is slightly slower (about 1%) with -server option than ArrayList.
Still 3.5 times faster with -client though.

edit: I was just iterating and adding integers, so no deletion was taken into account.
edit2: forget this post, it also depends on the size, with more elements (500000) the bag wins again.

I don’t get why people don’t just turn of the stupid warnings? Just putting “Unchecked generic operation” and “Usage of a raw type” to “ignore” will keep you from littering your code with tons of useless pointy brackets, eg on the RHS of initialization. FEAR the ClassCastException…

I write a fair amount of code that other programmers will see, and don’t want to be the cause of besmirching someone else’s pristine Problems tab. Hence my Eclipse setup is so very uptight.
Eclipse takes care of the extra-typing drudgery anyway.

Well, it makes my eyes bleed! :stuck_out_tongue:

FIXED performance issue in forum search

Wow, I like this under-promise over-deliver thing that’s going on.

So now google indexes JGO, and the internal forum search is faster too.

very cool 8)

thanks