[KDE Dot News]
 faq
 flatforty
 contribute
 subscribe
 configure
 search
 rdf

 main
 parent
 thread


Re: Native code FUD
by Tim Jansen on Monday 09/Aug/2004, @00:38
"All Objective-C instances are allocated on the heap."

BTW this is not strictly necessary in Objective-C, and neither in Java or C#. They could use stack-allocation for many short-lived objects. It would require more/better analysis of the code though, to determine for which objects it is possible.

(Similarly all the other performance problems listed by Matthias can be solved by more intelligent compilers - we're just not there yet)
  Related Links
 ·   Articles on Community and Events
 ·   Also by Tim Jansen
 ·   Contact author

Thread Threshold:

The Fine Print: The following comments are owned by whomever posted them.
( Reply )

Re: Native code FUD
by Richard Dale on Monday 09/Aug/2004, @00:50
"BTW this is not strictly necessary in Objective-C,"

It isn't possible in Objective-C - you create an instance by messaging a class object, and then sending an initialization message to the new instance. Only string literals of the form @"mystring" can be statically allocated

Instances are allocated in 'autorelease pools'. You can create you're own autorelease pools, and you would do that if you have a lot of short lived objects.

C# already allows to allocate short lived objects on the stack.
[ Reply To This | View ]
Re: Native code FUD
by Rayiner Hashem on Monday 09/Aug/2004, @08:09
Lot's of compilers are already at that point. Stalin, CMUCL, d2c, Bigoo, etc, all do these sorts of optimizations. It's just something that hasn't come to C# and Java compilers yet (and will never come to C/C++ compilers, because of their semantics).
[ Reply To This | View ]
The Fine Print: The previous comments are owned by whomever posted them.
( Reply )

  "I'm adding spaces everywhere so that Charles doesn't edit the files." -- Stephan Kulow
KDE®, "K Desktop Environment", "KDE Dot News", "got the dot?" and the KDE Logo® are trademarks or registered trademarks of KDE e.V. in the European Union, the United States and other countries. All other trademarks and copyrights on this page are owned by their respective owners. Comments are owned by the poster. The rest: Copyright © 2000-2008 KDE e.V. for The KDE Project. For further information or comments on this site, please contact the Webmaster.
[ home | post article | flat forty | subscribe | search | rdf ]