Closed arBmind closed 5 years ago
wobjectdefs.h is completely changed. Maybe something wrong with the line ending.
I have myself played with a tuple. But I was not so successful at making it work.
I just pushed a tuple
branch, see commit 2b4ec3530215b351bb32c9edcc1409aa4f617eee
But it wasn't faster for me so i must have done something wrong.
wobjectdefs.h is completely changed. Maybe something wrong with the line ending.
Oh, sorry. My rebase tool might have skrewed it up. You can use ignore whitespace changes
to view the changes for now. I will try to fix that.
I just pushed a
tuple
branch, see commit 2b4ec35 But it wasn't faster for me so i must have done something wrong.
Some differences:
_tail
is quite inefficient for tuples. I guess it's better to use indexed iterations. This also prevents a lot of copies.Offset
to allows for faster prepend
.I also implemented the concatenation of an entire string list without any recursion.
But compile times still feel too slow… Maybe we need C++17 to do better on this.
I fixed the line ending issue.
It seems I broke something. The empty strings are no longer stored correctly.
Yay, all green now.
@ogoffart Can you check the compile efforts of gcc to compare it before and after? - It should a least be comparable.
As it turns out, with the forward counters we no longer need any tuple implementation. (See #59)
I keep this PR open to allow a timing comparison - I'm still curious.
The usage of binary tree seems quite excessive, so I tried to use a simple constexpr enabled tuple implementation as a replacement.
constple::tuple
uses inheritance and starts withOffset=1000
.The new tuple is only used for StaticStringList right now and it saves like 5-8% of total compile time. So it seems to work well.
What do you think? Is it worth to complete this?