Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  [fulfilled] Forum search  (Read 4517 times)
0 Members and 1 Guest are viewing this topic.
Offline CommanderKeith
« Posted 2010-04-01 12:19:37 »

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 Smiley
Thanks,
Keith

Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #1 - Posted 2010-04-01 12:31:27 »

Thar she blows!. I agree that the search could be better, probably easiest just to let google in.
Online Riven
« League of Dukes »

JGO Overlord


Medals: 746
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #2 - Posted 2010-04-01 12:36:06 »

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...

http://riven8192.blogspot.com/2009/08/bag-unordered-list-fast-remove.html

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline CommanderKeith
« Reply #3 - Posted 2010-04-01 12:51:21 »

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

Bleb, for some reason the source code link/attachment on reply 51 here (http://www.java-gaming.org/topics/java-collections-good-for-gaming/14938/msg/119747/view.html#msg119747) seems to be broken - 404 error. I know it's not your link, the forum seems to have lost it....


Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #4 - Posted 2010-04-01 13:30:16 »

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.
Online Riven
« League of Dukes »

JGO Overlord


Medals: 746
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #5 - Posted 2010-04-01 15:16:27 »

It's probably much faster to do:

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

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #6 - Posted 2010-04-01 16:05:16 »

Done
Offline Hansdampf

Senior Member


Projects: 3


too offending?


« Reply #7 - Posted 2010-04-01 22:18:17 »

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.

lots of sillystupid games: http://www.emaggame.com
Offline Hansdampf

Senior Member


Projects: 3


too offending?


« Reply #8 - Posted 2010-04-01 22:33:05 »

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.
final edit: guess what, iterating in reverse order (for(i=size-1;i>=0;i--) is SLOWER with -server on an array than the normal way. Yay! my mircobenching sucks.

lots of sillystupid games: http://www.emaggame.com
Offline Nate

JGO Kernel


Medals: 145
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #9 - Posted 2010-04-02 02:12:02 »

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.
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...

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #10 - Posted 2010-04-02 11:01:34 »

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.
Offline Nate

JGO Kernel


Medals: 145
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #11 - Posted 2010-04-03 01:04:45 »

Well, it makes my eyes bleed! :p

Online Riven
« League of Dukes »

JGO Overlord


Medals: 746
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #12 - Posted 2010-12-17 02:39:19 »

FIXED performance issue in forum search

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline CommanderKeith
« Reply #13 - Posted 2010-12-17 04:29:25 »

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  Cool

thanks

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Riven (20 views)
2014-07-29 18:09:19

Riven (13 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (31 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (42 views)
2014-07-24 01:59:36

Riven (42 views)
2014-07-23 21:16:32

Riven (28 views)
2014-07-23 21:07:15

Riven (29 views)
2014-07-23 20:56:16

ctomni231 (60 views)
2014-07-18 06:55:21
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!