-
Notifications
You must be signed in to change notification settings - Fork 146
Better ReferenceCounter branch[tarjin-2] #460
Conversation
We need to test which one is better, this or #459? |
test with old PoC tarjin-2 cost 0:00:07 it's a huge improvement |
test with a PoC derived from Tanya-4 whose itration number is 3800 instead of 380000 (otherwise the time will be longer)
tarjan => 0:00:21 Tanya-4 and Tanya-6 is the only two issues which have not been fixed thoroughly. if we set iteration number to 38000 which is tarjan => 0:01:09 I'm trying my best to do the time complexity analysis ...... This result is weird for me |
The best time complexity for GC is O(n), therefore Tanya-4 is hard to prevent. And at this time, there are lots of other O(n) issues such as Bytes opration. Just ignore Tanya-4 will be an understandable choice. In a certain point of view, neo-project/neo#2725 is also a variant of Tanya-4, the GetNotification syscall creates lots of small object and the dropping will cause a slow GC. |
Tanya-6 cost 0:00:06 which is still a huge improvement compared to no-optimization. The result is based on the cheapest MacBookAir with m1 chip and release version of dotnet6.0. After testing many times with Tanya-4 and iteration number set to 10000, tarjin-3 cost 0:00:25 while tarjin-2 cost 0:00:34 adn tarjan cost 0:00:18. They all have a O(n) time complexity in this case. |
#463 is the best. Closed this one. |
(Maybe) an optimized version of #459