Analyze the memory allocation and performance characteristics of contiguous versus linked linear data structures.
Write a program that implements a custom Linked List class with append, prepend, insert, and delete methods, then compare its speed to a standard array for inserting at index 0.