weld-project / weld

High-performance runtime for data analytics applications

Home Page:https://www.weld.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

weld_rt_thread_id() calls in dictmerger

mihai-varga opened this issue · comments

In the cpp runtime, the dictionary calls (the expensive?) weld_rt_thread_id() (which then calls pthread_getspecific) twice for every item that is added in the dictionary. I believe the threadID is already available somewhere in the function stacks when weld_rt_dict_merge is called from llvm, so that value could be passed in the function call as well.

I don't think I'll manage to do a proper pull request any time soon, but in my small experiment involving a dictmerger, 10 mil entries and running on 1 thread I get a speedup of 1.4 by replacing the weld_rt_thread_id() call from dict-new.cpp with 0.

Ah I see, then I'll just close the issue.