• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Serializing collections
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Serializing collections


  • Subject: Re: Serializing collections
  • From: Miguel Arroz <email@hidden>
  • Date: Thu, 7 Feb 2008 17:32:50 +0000

Hi!

  Small detail: 100k times, not 100000k times!

  Yours

Miguel Arroz

On 2008/02/07, at 17:31, Miguel Arroz wrote:

Hi!

I need to serialize some collection objects (NSDictionaries, NSSets, etc) to save them in the DB. I'm doing some performance tests based on the Chuck's book page 43 note.

I have tried with the NSPropertyListSerialization and java Serialized stuff (as instructed on the Apple's note http:// docs.info.apple.com/article.html?artnum=75173&coll=ap).

For serializing and unserializing the same dictionary 100000k times, I have:

NSData length: 667
String length: 326
Property list serialization took 12272 milisecs, average 0.12272 per dict.
NSData serialization took 49137 milisecs, average 0.49137 per dict.


  (Note average values are in milisecs/dict, not secs/dict.

  There is two things here that actually amazed me:

  1) String is shorter than binary by a factor of 2;
  2) String is a lot faster than binary.

  I admit I was expecting the opposite.

Facing this, I ask: string serialization is faster, shorter and human readable. Is there any dark reason why I should use binary serialization and not text?

  Yours

Miguel Arroz

Miguel Arroz
http://www.terminalapp.net
http://www.ipragma.com



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40guiamac.com


This email sent to email@hidden

Miguel Arroz http://www.terminalapp.net http://www.ipragma.com



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Serializing collections (From: Miguel Arroz <email@hidden>)

  • Prev by Date: Serializing collections
  • Next by Date: Re: BUG: WO 5.4 combined template parser + XML declaration
  • Previous by thread: Serializing collections
  • Next by thread: Re: Serializing collections
  • Index(es):
    • Date
    • Thread