fennelvec is optimized version of fennel.m