Skip to content

Add a few benchmarks - #20

Merged
koppen merged 1 commit into
mainfrom
benchmarks
Aug 25, 2026
Merged

Add a few benchmarks#20
koppen merged 1 commit into
mainfrom
benchmarks

Conversation

@koppen

@koppen koppen commented Aug 6, 2026

Copy link
Copy Markdown
Member

Run them with rake benchmark:

#add with many distinct tokens             n=500     0.0012s  n=4000    0.0667s  ratio=  54.72  max= 128.00  OK
incremental + and render on each step      n=300     0.0017s  n=2400    0.0852s  ratio=  50.26  max= 128.00  OK
chained + with a single render at the end  n=300     0.0007s  n=2400    0.0280s  ratio=  38.69  max= 128.00  OK
#remove with many distinct tokens          n=500     0.0018s  n=4000    0.1076s  ratio=  59.70  max= 128.00  OK
#toggle with many distinct tokens          n=500     0.0024s  n=4000    0.1329s  ratio=  55.74  max= 128.00  OK

Run them with `rake benchmark`:

    #add with many distinct tokens             n=500     0.0012s  n=4000    0.0667s  ratio=  54.72  max= 128.00  OK
    incremental + and render on each step      n=300     0.0017s  n=2400    0.0852s  ratio=  50.26  max= 128.00  OK
    chained + with a single render at the end  n=300     0.0007s  n=2400    0.0280s  ratio=  38.69  max= 128.00  OK
    #remove with many distinct tokens          n=500     0.0018s  n=4000    0.1076s  ratio=  59.70  max= 128.00  OK
    #toggle with many distinct tokens          n=500     0.0024s  n=4000    0.1329s  ratio=  55.74  max= 128.00  OK
@koppen
koppen merged commit e8cb34f into main Aug 25, 2026
7 checks passed
@koppen
koppen deleted the benchmarks branch August 25, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant