Results 1 to 2 of 2

Thread: More on efficiency... (was My First 3D Game)

  1. #1

    More on efficiency... (was My First 3D Game)

    Sly wrote:
    I would like to use someone else's engine, but I have never found one that I would deem suitable. Most engines I have seen, especially for Delphi, heavily use classes and dynamic strings. Yeah, they're easy to use, but horribly inefficient when it comes to memory usage. This may come from my commercial game development background, but efficiency is key to making a good engine.
    Regarding strings: Note that even as simple operation as string assignment ("s1 := s2") produces (at least one) procedure call since Delphi (and also FreePascal) uses reference-counting to manage string (de)allocation.

    object-s vs class-es: Object-s have one great advantage that you don't need to allocate them. On the other hand, there are some tricky situations with them that you need to worry about, like this one: if you have virtual method inside object, you _have_to_ call constructor to initialize VMT, otherwise, VMT is not initialized, and you get really stupid bug! :x
    [/quote]
    blog: http://alexionne.blogspot.com/

  2. #2

    More on efficiency... (was My First 3D Game)

    it would be interesting to see how many clock cycles it takes to create a object compared to a class instance using TObject and TFastObject. :?:

    I always found working of object dereived objects caused me problems. But I think I've been working with Delphi for so long, I've forgottenthe advantages of using the old TP7 style object.
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •