fork download
  1. using System;
  2. using System.Diagnostics.Contracts;
  3. using System.Runtime.CompilerServices;
  4.  
  5. namespace FTPdsakldksaldkadsadasdasdasdasdasdas.dsadasdsadsadsadsadasdsadasdsad.asdasdasdasdsadsadsadsadsadasdsadsad.asdasdasdsadasdsadasdasd // fuck the police!
  6. {
  7. public class Test
  8. {
  9. private static int Key => StableHashString();
  10.  
  11. public static void Main()
  12. {
  13. var sw = System.Diagnostics.Stopwatch.StartNew();
  14. var fullName = Key + "";
  15. var a = Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key + Key;
  16. Console.WriteLine("fullName: " + fullName + ", hash: " + StableHashString(fullName));
  17. sw.Stop();
  18. Console.WriteLine("elapsed: " + sw.Elapsed.TotalSeconds);
  19. }
  20.  
  21. [Pure]
  22. public static int StableHashString([CallerMemberName] string text = null, [CallerFilePath] string ignore = null)
  23. {
  24. // TODO: Determine nullity policy.
  25. Console.WriteLine("text: " + text + ", ignore: " + ignore);
  26. var t = ignore + text;
  27. unchecked
  28. {
  29. int hash = 23;
  30. foreach (var c in t)
  31. {
  32. hash = hash * 31 + c;
  33. }
  34. return hash;
  35. }
  36. }
  37. }
  38. }
Success #stdin #stdout 0.02s 18164KB
stdin
Standard input is empty
stdout
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: Key, ignore: /home/c30BtZ/prog.cs
text: 481762378, ignore: /home/c30BtZ/prog.cs
fullName: 481762378, hash: -605112711
elapsed: 0.0081507