Going YUL-YYZ-PEK you do not have to pick up and re-check your bag in YYZ. It should take you about 10 minutes to walk from the domestic to international gates with lots of moving walkways along the route.
Going PEK-YYZ-YUL you do have to pick up your bags in YYZ and then drop them off at the connections area. With a NEXUS card, you will be throguh Customs in under a minute.