Huge runtime difference in recursion involving strings in G++11 vs G++14

Правка en1, от Vicennial, 2017-03-15 12:20:01

I had to use recursion+strings for a problem in a contest and I stumbled upon this irregularity.

Sample Code 'A' with strings:

Using input=5
Results:
G++ 11 5.1.0 = 7987 ms, 2044 KB
G++ 14 6.2.0 = 889 ms, 1856 KB
------------------------------------

Sample Code 'B' without strings:

Using input=6
Results:
G++ 11 5.1.0 = 3026 ms, 2012 KB
G++ 14 6.2.0 = 2995 ms, 1868 KB

To test it yourself, head over to http://mirror.codeforces.com/problemset/customtest

Why is there such a huge difference when strings are used?

Теги c++ 11, c++ 14, bug, c++11 vs c++14

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Vicennial 2017-03-15 12:20:01 1303 Initial revision (published)