In my personal opinion, the end. Asking people to subscribe (or like) at the beginning of a video is a bit obnoxious and appears manipulative. Because you're telling your audience to do something with your video before they've even formed their own opinion on it. Granted, you might get more subscribers because not all people stick around until the end.. But it's simultaneously going to tick a lot of people off.
These type of subscribers will likely have a lot of subscriptions. So they are more likely to become a product of subscriber burn and become inactive subscribers very shortly.
Definitely the end - personally when i watch a video i want to get straight into the video content, then aftee watching the content if someone asks to sub i can make a decision about it.Should I ask to subscribe at the beginning of the video, or the end? The beginning might work better, but I might look unprofessional. So when should I ask?
I personally would never ask my viewers to subscribe , if they like your channel and content they will naturally.