I expect "-shave" uses the same code as "-crop", with a trivial calculation to get the required parameters.
Some experimentation shows that "-shave 10x10" is much quicker than "-sharpen 2". This is not surprising as "-shave" merely copies pixels, but "-sharpen" convolves each pixel with a kernel.
Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".