Much of the time when people are trying to do something "as quickly as possible" they may be wasting time worrying about things that don't actually matter a whole lot. Have you tried writing the code to just replace all the references, and timing it to see how quick it actually is? As Allion noted, it's not very difficult to write - why not try it and see how well it works? If it's fast enough for you, problem solved. If not, you have a starting point for reference, so when you make changes in the future you can tell whether those changes made any difference or not - and how much.
OK, so you've got multiple serialized object files containing references to bjects which are
supposed to be the same object, but they're not? That's consistent with the way serialization normally works. By default each file would contain its own copy of the object, and when deserialized you'd get a bunch of identical objects - which now you're trying to fix? I wonder if the thing to do here might be to add a
readResolve() method to the class you're trying to replace values of. This gives you a mechanism to insert a reference to the correct object as you deserialize. It's hard to say if this will work for you though. We probably need more info about what you're doing.