Assuming I have a string
var x = "aaaabbbbbbbbcccc"
What would be the most performant way to read these 3 slices into the int types if I know the start index (here 0)?
The link was indeed very helpful, so I used the following:
From T to string:
result = ""
  var t: T
  var fromTtoString = cast[ptr array[sizeof(T), char]](unsafeAddr(t))[]
  for c in fromTtoString: result.add(c)
var t: T = cast[ptr T](unsafeAddr(serializedStringData[stringIndex]))[]