Skip to content
Snippets Groups Projects
  1. Jun 04, 2018
  2. Jun 02, 2018
    • Yuka Takahashi's avatar
    • Yuka Takahashi's avatar
      0a4aa7bf
    • Yuka Takahashi's avatar
      Cache library names, not identifiers · 7e0ed173
      Yuka Takahashi authored
      This is perfomant than caching identifiers, more extensive to
      experiments, and code is simpler.
      7e0ed173
    • Yuka Takahashi's avatar
      Incremental Initialization · af4e6cfb
      Yuka Takahashi authored
      Try to iterate through libraies until we will find a mangled_name;
      If found, we just break and start from there next time.
      af4e6cfb
    • Yuka Takahashi's avatar
      [cxxmodules] Autoload less libraries · 5b3e3fb4
      Yuka Takahashi authored
      In previous allmodules&autoloading patch, we used callback from
      DeserializationListener to get Decl and loaded corresponding libraries.
      It worked, but the performance was bad because ROOT was loading
      excessive libraries.
      
      In this patch, we use TCling::LazyFunctionCreatorAutoloadForModule. This
      function gets callback when "mangled_name" was not found in loaded
      libraries thus we have to the load corresponding library and lookup
      again.
      
      I used unordered_map to store mangled identifier and library pair. I'm
      doing an optimization by hashing mangled name and storing library not by
      name but by uint8 and hold uint8-name information in another vector.
      Also tried std::map but unorderd_map was more performant. There are
      better hash table like:
      https://probablydance.com/2018/05/28/a-new-fast-hash-table-in-response-to-googles-new-fast-hash-table/
      we can try to use them if this part gets crucial.
      
      With this patch:
      ```
      Processing tutorials/hsimple.C...
      hsimple   : Real Time =   0.04 seconds Cpu Time =   0.03 seconds
      (TFile *) 0x562b37a14fe0
      Processing /home/yuka/CERN/ROOT/memory.C...
      cpu  time = 0.362307 seconds
      sys  time = 0.039741 seconds
      res  memory = 278.215 Mbytes
      vir  memory = 448.973 Mbytes
      ```
      
      W/o this patch:
      ```
      Processing tutorials/hsimple.C...
      hsimple   : Real Time =   0.08 seconds Cpu Time =   0.07 seconds
      (TFile *) 0x5563018a1d30
      Processing /home/yuka/CERN/ROOT/memory.C...
      cpu  time = 1.524314 seconds
      sys  time = 0.157075 seconds
      res  memory = 546.867 Mbytes
      vir  memory = 895.184 Mbytes
      ```
      
      So it improves time by 4x times and memory by 2x.
      5b3e3fb4
  3. Jun 01, 2018
  4. May 31, 2018
  5. May 30, 2018
  6. May 29, 2018
Loading