Jasmin Blanchette says rightly about the file differences:
They won't necessarily be of the same length: as the GIF89a specification point out, encoders may or may not send clear codes at any time to reset the string table, which defininitely affects file length. Generally speaking, different encoders have different behaviors with respect to this.
The important point is that when writing an encoder, you may be tempted to compare the output of your program with a known encoder. Having different output doesn't mean that either of the encoders is wrong.