Every premium and members-only resource for $9.99/month, as a no-commitment subscription. See the plans

PalateKit

Menu

Request a resource

Describe the resource you are missing in one sentence. We will email you when it is published.

0 / 280

Unlock PalateKit

Unlock everything

Plan

Paying means accepting our terms of sale.

Secure payment by Stripe. Receipts and invoices sent by email.

Welcome back

Sign in to install, download or save this resource. A free account is enough for free resources.

Complexity review: nested loops and N+1 queries v1.0.0

Use this resource to find and fix complexity blowups in Python, JavaScript, Java or Go code

New

  • 427 downloads
  • 117 likes
  • 172 saves

Free

Install with the CLI

In a terminal, from the folder you want:

npx --yes palatekit@latest install big-o-complexity-review

With no option, the skill goes to ~/.agents/skills/; add --agent claude-code (or codex, cursor…) to target an agent.

First time: connect the CLI with

npx --yes palatekit@latest login

The agent looks for patterns that make running time explode, against 39 rules: nested loops, I/O inside loops, poor data-structure choices, recursion and repeated computation. It states the complexity before and after, then the fix. You get code that stays fast as the data grows.

Mostly picked by

Updated November 2, 2026

Card for the “Complexity review: nested loops and N+1 queries” skill

Details

Generates with
Your agent's model
Licence
MIT

Similar resources

View all

What you get

  • references/: cards on nested loops, queries in loops and searches
  • references/: cards on caching computed results, recursion and presizing

Good fit for

  • An API slows down once a list passes a few thousand items
  • An ORM loads a relation for every row in a loop

Not for

    Tags

    • complexity
    • big-o
    • performance
    • code review
    • n+1

    About

    You say

    “This function is slow on 50,000 orders. Give me its complexity and the fix to avoid the N+1 query.”

    Card for the “Complexity review: nested loops and N+1 queries” skill

    Skill published by pproenca under the MIT license, delivered in its original version.

    Show more

    How to use it

    1. Install the skill in your agent's skills folder
    2. Ask your agent to find and fix complexity blowups in Python, JavaScript, Java or Go code
    3. Review and adjust the result

    Content preview

    Files

    • AGENTS.md10.5 KB
    • assets/templates/_template.md2.7 KB
    • LICENSE1.1 KB
    • metadata.json1.4 KB
    • NOTICE-PALATEKIT.md0.5 KB
    • README.md7.7 KB
    • references/_sections.md3.8 KB
    • references/build-avoid-immutable-object-spread.md2 KB
    • references/build-avoid-quadratic-string-concat.md2.2 KB
    • references/build-avoid-spread-in-reducer.md2 KB
    • references/build-presize-when-length-known.md2.5 KB
    • references/compute-cache-expensive-pure-results.md2.6 KB
    • references/compute-cache-property-lookup.md2.3 KB
    • references/compute-defer-or-short-circuit.md2.2 KB
    • references/compute-hoist-loop-invariants.md2.5 KB
    • references/compute-precompile-regex.md2.2 KB
    • references/ds-counter-for-histograms.md1.9 KB
    • references/ds-deque-for-front-operations.md2 KB
    • references/ds-hashmap-for-keyed-access.md2.2 KB
    • references/ds-heap-for-top-k.md1.6 KB
    • references/ds-sorted-structure-for-range-queries.md2.2 KB
    • references/ds-trie-for-prefix-search.md2.5 KB
    • references/io-batch-instead-of-per-item.md2.2 KB
    • references/io-file-read-in-loop.md2.1 KB
    • references/io-missing-eager-load.md2.2 KB
    • references/io-n-plus-one-query.md2 KB
    • references/io-sequential-await-in-loop.md2 KB
    • references/nested-cartesian-comparison.md1.9 KB
    • references/nested-explicit-quadratic-loops.md1.6 KB
    • references/nested-find-in-loop.md1.7 KB
    • references/nested-includes-in-loop.md1.8 KB
    • references/nested-set-operations-on-arrays.md1.8 KB
    • references/nested-substring-search-in-loop.md2.5 KB
    • references/rec-iterative-for-deep-recursion.md2.1 KB
    • references/rec-memoize-overlapping-subproblems.md2.1 KB
    • references/rec-prune-with-bounds.md3.1 KB
    • references/rec-share-memo-across-top-level-calls.md2.4 KB
    • references/rec-tabulate-bottom-up.md2.3 KB
    • references/search-binary-search-on-sorted.md2 KB
    • references/search-build-index-once-amortize.md2.3 KB
    • references/search-quickselect-not-full-sort.md2.1 KB
    • references/search-sort-once-outside-loop.md2.1 KB
    • references/space-generators-over-intermediate-lists.md2.2 KB
    • references/space-release-retained-references.md2.8 KB
    • references/space-shallow-not-deep-copy.md2.2 KB
    • references/space-stream-dont-load.md2.5 KB
    • SKILL.md12.1 KB

    Origin and licence

    Listed unmodified

    Author
    pproenca
    Source
    github.com/pproenca/dot-skills/tree/cf93c57cac89d6fc3e4194686000411567f5caf3/skills/.experimental/algorithmic-complexity-review
    Licence
    MIT

    Notice

    « algorithmic-complexity-review » (pproenca, MIT) livré dans sa version d'origine : fiche en français et en anglais par PalateKit.

    User reviews

    –

    No ratings yet

    Loading reviews…

    Delete your review?

    Your rating and comment will be removed from the page.