appleseedlab / maki

A tool for analyzing syntactic and semantic properties of C Preprocessor macros in C programs
8 stars 3 forks source link

Use faster set types #51

Closed PappasBrent closed 2 months ago

PappasBrent commented 2 months ago

Closes #50

SilverMight commented 2 months ago

Code looks good to me but for some reason is running slower for me (about a second on average for a particular file)

PappasBrent commented 2 months ago

Do you mean a second slower for a specific file or a second slower on average? I couldn't notice a difference in speed for running Maki's the test suite but I figured that was just because the test suite was so small.

SilverMight commented 2 months ago

About a second on average for a specific large file.

PappasBrent commented 2 months ago

What's the exact file? Is it from Bash or one of the other evaluation programs? I can test myself and I'll mark this PR as a draft until I can push changes to actually improve performance since that's the point of this PR.

SilverMight commented 2 months ago

What's the exact file? Is it from Bash or one of the other evaluation programs? I can test myself and I'll mark this PR as a draft until I can push changes to actually improve performance since that's the point of this PR.

y.tab.c (the bison file) from bash - note this is a pretty bad case, didn't notice anything much in smaller files

PappasBrent commented 2 months ago

Ok so I took some time today to test the performance of Maki on y.tab.c from Bash, and didn't really find a difference in performance. I ran main-branch Maki on the file with the appropriate compile commands five times, and then the "faster" set types version of Maki on the file five times. I've attached the script I used to run my experiment to this comment as a text file because GitHub seems to disallow script file attachments. I've also attached my full results to this comment, but in summary I found that the main branch Maki took 2.01 seconds on average to process the file and the branch of Maki with this PR's changes took 2.02 seconds on average to process the file. So no real difference.

PappasBrent commented 2 months ago

I'm going to close this PR then since these changes don't seem to have any impact on performance.