function as vs perform the function of

function as

perform the function of

How often have the words function as and perform the function of occurred in a corpus of books? (source: Google Ngram Viewer )