• 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: What is the purpose of static typing?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is the purpose of static typing?


  • Subject: Re: What is the purpose of static typing?
  • From: Richard Wolf <email@hidden>
  • Date: Thu, 25 Jul 2002 16:14:31 -0500

Philip,

I have to say that I found Ondra's proof pretty convincing ... but I'm actually kind of curious about why you never considered a reverse of your window race? What I mean is, did you try it with statically-typed objects -first- and then id objects second ... just to see what would happen? My suspicion is that on your machine such a test would tend to show that dynamic typing was actually faster. My theory is that your test application is simply scheduled more nearer its start than at its end. Even with a single thread, it's up to Mach how often your code gets scheduled (or when and why it's scheduled).

On Thursday, July 25, 2002, at 07:13 AM, Philip George wrote:

Okay, so I got rid of the threads and I setup two buttons. One button draws the 'id' window and logs the start and end. The other does the same but for the statically typed window. Here are the results (ALL of the results) with the difference in creation/draw time under each set of log statements:

(Note that there are 50 NSTextFields in each window. They're statically-typed in the statically-typed win and id-typed in the id win.)

2002-07-25 06:28:38.182 windowrace[1702] id objects START
2002-07-25 06:28:38.896 windowrace[1702] id objects END
2002-07-25 06:28:41.055 windowrace[1702] statically-typed objects START
2002-07-25 06:28:41.355 windowrace[1702] statically-typed objects END

.414

etc. ...
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: What is the purpose of static typing? (From: Philip George <email@hidden>)

  • Prev by Date: Re: initWithCoder: called on objects in nibs
  • Next by Date: Re: NSTableView rows and delete key
  • Previous by thread: Re: What is the purpose of static typing?
  • Next by thread: Re: What is the purpose of static typing?
  • Index(es):
    • Date
    • Thread