Skip to content

Add clone instances for arenas #292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

hendrikvanantwerpen
Copy link
Collaborator

No description provided.

@hendrikvanantwerpen hendrikvanantwerpen requested a review from a team as a code owner July 4, 2023 22:43
@hendrikvanantwerpen hendrikvanantwerpen self-assigned this Jul 4, 2023
@github-actions
Copy link

github-actions bot commented Jul 4, 2023

Performance Summary

Comparing base acb0fab with head 3cce544 on microsoft/TypeScript@v4.9.5. For details see workflow artifacts. Note that performance is tested on the last commits with changes in stack-graphs, not on every commit.

Before
--------------------------------------------------------------------------------
Command:            base/target/release/tree-sitter-stack-graphs-typescript index -D base.sqlite --max-file-time=30 --hide-error-details -- test/src/compiler
Massif arguments:   --massif-out-file=perf.out
ms_print arguments: --x=72 --y=12 base-perf-results/perf.out
--------------------------------------------------------------------------------


    GB
1.170^            ##                                                          
     |            #                                                           
     |            #                                                           
     |            #                                                           
     |            #                                                           
     |            #                                                     ::    
     |            #        :               :                            :     
     |            #      ::: :      ::     :           :                :     
     |            #      : : :::    :  :::::         : :                :     
     |      ::  ::#      : : ::     :  : : :         :::             ::::     
     |    @@:   : # :::: : : ::     :  : : : ::    :::::   :       ::: ::     
     |    @ : : : # :::  : : :: ::: :  : : :::  :::: ::::  :  :: : : : :: @:::
   0 +----------------------------------------------------------------------->Gi
     0                                                                   186.7
After
--------------------------------------------------------------------------------
Command:            head/target/release/tree-sitter-stack-graphs-typescript index -D head.sqlite --max-file-time=30 --hide-error-details -- test/src/compiler
Massif arguments:   --massif-out-file=perf.out
ms_print arguments: --x=72 --y=12 head-perf-results/perf.out
--------------------------------------------------------------------------------


    GB
1.206^            #                                                           
     |            #                                                           
     |            #                                                           
     |            #                                                           
     |            #                  ::                                  :    
     |           @#                  :                                   :    
     |           @#                  :                                @ ::    
     |           @#       ::         :    ::                         :@ ::    
     |           @#       :  :       :  @ :           :              :@ ::    
     |     : @   @#   :  ::  ::      :  @::         :::    ::        :@ ::    
     |     ::@   @#  ::  ::  ::      :  @::        ::::    :     @ : :@::::@  
     |     ::@   @#: ::  ::  ::   ::::  @::  :   : ::::  ::: : ::@ :::@::::@  
   0 +----------------------------------------------------------------------->Gi
     0                                                                   190.6

@hendrikvanantwerpen
Copy link
Collaborator Author

Local testing showed that this approach is not correct. It can result in double-free panics. I wonder if this has something to do with the way strings are interned (symbols hold a &str)? Perhaps this will only be possible if we use the hashing arena's of #223? For now, I'm making this a draft again.

@hendrikvanantwerpen hendrikvanantwerpen marked this pull request as draft July 17, 2023 11:10
@hendrikvanantwerpen
Copy link
Collaborator Author

Closing this old experiment, which was not the right approach. If we ever want this, we need to rethink how strings are interned---perhaps using a proper deduplicating arena like in #223.

@hendrikvanantwerpen hendrikvanantwerpen deleted the arena-clone branch March 12, 2024 15:00
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