Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 638631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:45:13+00:00 2026-05-13T20:45:13+00:00

I am optimizing a part of a Delphi application where lists of objects are

  • 0

I am optimizing a part of a Delphi application where lists of objects are frequently filtered using different criteria. The objects are kept in TObjectList structures and it is common to select a very small percentage (ex. 1%) of the entire set with each filter. The total number of objects can be in the 100k range and during computations the main set doesn’t change. Although the filters are applied for only a few properties, the lists cannot be sorted in such a way that would optimize all the possible criteria.

I am looking for suggestions on how to organize the objects (data structures) or an algorithm that can be used to approach this problem. Thank you!

Filter example:

  ((Object.A between 5 and 15) AND
  (Object.B < 20) AND
  (Object.C(AParam) > 0)) OR
  (Object.IsRoot(...))
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:45:13+00:00Added an answer on May 13, 2026 at 8:45 pm

    Idea #1

    Run your code in a profiler. Find out if there are any slow spots.

    Idea #2

    Possibly you could take advantage of cache effects by storing your objects sequentially in memory. (I’m assuming you are walking your list sequentially from beginning to end.)

    One way to do it might be to use an array of records instead of a list of objects. If that’s possible in your case. Remember that records in Delphi 2006 can have methods (but not virtual ones).

    Another idea might be to write your own class allocator. I’ve never tried that, but here’s an article I found. Maybe try walking the objects using a pointer instead of using the TObjectList.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm optimizing some frequently run Perl code (once per day per file). Do comments
How does an optimizing c++ compiler determine when a stack slot of a function(part
I am working on a project involving optimizing energy consumption within a system. Part
Possible Duplicate: Optimizing Android application before release How can we lower battery consumption in
I've currently got a web application that I need optimizing, and one of methods
Currently optimizing an application at work. There are many files in some of the
Been optimizing an algorithm and came down to the last part. I have an
I'm currently optimizing an application, one of the operations that is done very often
I am trying to optimize my ASP.NET MVC application using some techniques that include
I am optimizing some code for an Intel x86 Nehalem micro-architecture using SSE intrinsics.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.