Why do i lag on minecraft?

My computer specs are
Manafacturer: Toshiba
Ram: 6gb
system type: 64 bit
Proccesor: intel r core i5-2450m cpu @ 2.50ghz
Graphic Card: Intel Hd Family Graphics
I got optifine and settings on low i get about 40 fps when i look towards floor but when i start looking around drops to like 3 fps Help Please

How much RAM do you have dedicated to minecraft? You can change the amount in the launcher.

You need a new computer

Your grahpics card maybe