Wow, thanks for so many high-quality answers!!
I'll go with Álvaro's (brilliant) trick for now!
(I needed a fast function, because it's executed for each cell out of 33^3 (in each voxel chunk). If voxels at the cell's corners are different, then a material transition is taking place and the cell must contain a surface vertex.)