Mix sugar, eggs and butter in top of double boiler. Cook over boiling water until mixture begins to thicken. Add pineapple and cook, stirring constantly. Cook until mixture begins to bubble. Remove from heat and add pecans. Press half of vanilla wafers into a 2 qt. glass dish. Cover with half of pudding. Repeat. Chill for 24 hours. Serve plain or topped with whipped cream.