I'm trying to convert a wchar_t array into an int array which contains the encoding of each wchar_t element in C. I know I can do this by a loop like the code below, is there any other way without using a loop which can greatly improve performance?
for(int i=0; i< filesize; i++){
t[i] = (int)p[i]; //t is an int array, p is a wchar_t array
}