I am trying to find a match between a reference binary signal and a large set of data. From experience, the reference signal can appear time-shifted(that is why I've chosen dtw) and inverted, meaning a reference  may be represented as . Is there a clever metric that i can use, or some alterations of the signals (some kind of norming before dtw), such that, in a single pass, i can check both normal and inverted bit signals? The obvious and labourish way would be to analyze the bit signals, revert them, and make a second dtw pass, but i'm trying to beat that.
I had a similar experience, i had to align side channel traces, I've tried to implement my own DTW that do lot of things not only aligning, but the this method was extremely slower than separating the processing and DTW.
So if you are using python the FastDTW will do the job insanely quicker than any handmade DTW, so the laborious way is the quickest way to get the aligned signals, besides that on very large signals DTW need huge amount of memory, so separating the two process is in my experience is the best solution.
Not sure if this is what you want, but Mueen has a nice paper on fast DTW of sparse binary signals http://www.cs.unm.edu/~mueen/Projects/AWarp/awarp.pdf