In some situations it may be faster to skip going through Hyrule Castle all together. This can be achieved by doing a somewhat precise Item Slide as shown in the video. For the best success with this trick, you'll want to slowly maneuver the slide to the right while up against the wall shown in the video, when you see the camera pop backwards immediately use the Leaf to fly to the bridge if Link is not already over it. If Link does not clip through but is stopped by the wall on the front side of the castle, then you weren't travelling fast enough or were travelling right too fast.
If you Item Slide against the statue that's intially blocking your way into the Master Sword chamber, you will clip into it and can just enter the loading zone.
After entering the Hyrule interior, roll over to the pillar on the right and perform a Roll Clip to enter the pillar. Now go down the stairs while staying inside the wall until you reach the bottom pillar. From here, put yourself next to where the floor ends and aim towards the void. Begin to crawl, and you should fall through the floor. Once you fall through, pull out the Deku Leaf and leaf to the loading zone.
After returning to the main floor, head down to the main level hallway on the right and go to the end to find a railing on your left. Climb up onto it, and then do a sidehop to your right as to get yourself into the proper position. Now turn around, go into first person mode and line up slightly more to the right (a few pixels should be fine). Now pull out a bomb, set it down with ZR, and hold forward to grab the ledge. Do NOT hold forward before setting down the bomb, Link will not grab the ledge if you do this.
Right after Link grabs the ledge, tap right on the control stick to Ledge Clip into the wall. You will automatically fall down, and can now jump OoB and use Leaf Pumping to get to the castle exterior loading zone--bypassing the electric barrier altogether. Once you are outside the castle you can use either a savewarp to the front of the castle and leave.
Although we do give this trick description based on the railing on the right side of the main room, you can also use the one on the left side of the room to clip OoB as well. However you cannot simply hold up on the control stick after dropping the bomb to grab the ledge and clip; Instead you must use the Leaf to re-grab the ledge as is typical of most other Ledge Clips.
Note: You will not have to defeat the enemies when you visit hyrule for the second time. Instead, when you enter the castle for the second time the electric barrier will dispel and the music will play as if you just defeated the enemies.
See Barrier Skip page.