Spartan Java

Archive for April, 2009

Fast collection look-ups

by ricardoz on Apr.30, 2009, under Performance, Tips

I recently had to load a bunch of objects into memory and then perform thousands of look-ups over that collection. Using the good old java.util.ArrayList just didn’t cut it, the contains() function is extremely slow (as you would guess of course since this implementation stores elements as they are inserted and without any aditional indexing structure).
(continue reading…)

4 Comments :, , more...

Automatically serialize POJOs to and from JSON

by ricardoz on Apr.22, 2009, under JavaScript, Tips, Web related

The best tool I’ve found so far to serialize POJOs to JSON (and back again) is XStream, it’s automatic, simple and elegant, check it out.

2 Comments :, , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...