I managed to slightly fix it. Somehow setting the java to 32 bit made it playable (still slightly laggy though) Hopefully this should shed more light on the solution. I still can't run larger packs like Attack of the B-team and Tekkit very well though, which makes sense considering I'm only limited to one GB.
Intel(R) Core(TM) i5-6200U CPU @ 2.30 GHz 2.40 GHz
8 GB of RAM
64 bit OS
64 Based processor
Windows 10
I don't think that this is a problem of how powerful my computer is since any other programs run smoothly as ever in the background.
Also, I've tried Optifine which hasn't helped at all.
No matter what I do, all packs lag to the point of being unplayable. I tried messing with the RAM, but this doesn't help. However, when pressing f3 after making changes to the RAM I can see that the memory has been corresponded, but memory used stays roughly the same (3-7%). Any suggestions?