• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. How to reduce the runtime of gc function called by system...

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 10053
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to reduce the runtime of gc function called by system?

GGLin
GGLin over 3 years ago

Currently I write a SKILL code and find out the run time of gc function takes more than the main function I use in SKILL IDE information(~10x).

This is a system call function to do garbage recollectionin user manual, so I guess this is from some bad coding style but not quite sure how to reduce this problem.

Is there any suggestion to solve this problem?

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago

    Lots of time spent in gc() typically means that you are creating a lot of data that is getting thrown away (garbage collected). Using the profiler you can profile (by setting the profiler options) to profile for memory - so you can check that. Also look at how you are processing lists to see what your code is doing. Calling gcsummary() can also sometimes give some clues as to the objects themselves that are growing in number or are needing frequent garbage collection.

    You might also want to contact customer support so that an application engineer can look with you and provide some advice?

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • GGLin
    GGLin over 3 years ago in reply to Andrew Beckett

    Thanks for the suggestion. I found the one critical problem is the append function with large data. By using tconc + car instead of append function the problem is solved.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to GGLin

    Ah, yes - using append in a loop to keep appending to the end of a long list can result in a lot of garbage and is a common mistake. You might find it useful to look at my Writing Good SKILL Code (Video) where I mention this (amongst other things).

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information