GIRAPH-938: Allow fast working with primitives generically (ikabiljo via pavanka)