GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Main.cpp · Issue #699 · cppcheck-opensource/simplecpp

Main.cpp #699

New issue
Copy link
New issue
Copy link
Open
Open
Main.cpp#699
Copy link

Description

@xx-del-xx
xx-del-xx
opened on Aug 19, 2026
Issue body actions

I have a complaint about main.cpp. Specifically, it has a lot of unnecessary code repetition in the switch statements that can easily be abstracted away (and likely even sped up!) if you know what you're doing.

For branchless programming, this is definitely a case where it could earn a non-negligible boost in time performance. Maybe it could be done with function array lookups?

Activity

  1. xx-del-xx commented on Aug 19, 2026

    @xx-del-xx
    xx-del-xx
    on Aug 19, 2026
    Author
    More actions

    Actually it seems like there's more (and equally concerning) use of branches elsewhere in the code--or at least where I've looked--not just in main.cpp that could slow it down by quite a bit.

    Has anyone working on this project taken this into account?

  2. danmar commented on Aug 31, 2026

    @danmar
    danmar
    on Aug 31, 2026
    Collaborator
    More actions

    main.cpp is just a demo client with example code. the code should be easy to read and understand.

    As for simplecpp.cpp I am not sure exactly what you suggest. feel free to show some example.

  3. danmar commented on Aug 31, 2026

    @danmar
    danmar
    on Aug 31, 2026
    Collaborator
    More actions

    I would like that you suggest a better name for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.