I was curious about some implementation details.
I guess that any value in AS in the end will be stored in a something like a tagged union with at least sizeof(void*)
bytes, and I guess that a asOBJ_VALUE | asOBJ_POD
registered type is managed by std::memcpy
into and from uint8_t*
heap allocated data.
But I have a lot of small types which could fit inside a void*
so I was wondering if any kind of small object optimization is implemented so that it's copied directly aliased in the union so that a lot of allocations and deallocations are avoided, which could be really optimal in my scenario in which I move a lot of these values.