Still relatively well, hence why it has been reducing the gap for a while and is on pace to beat the PS4 in Japan despite an upcoming PS4 bump due to Final Fantasy VII Remake, because PS4 sales have decreased faster than PS3 sales late in the lifecycle.
Another factor is that the delayed PS4 launch allowed the PS3 to have eight holiday seasons as Sony's main console whereas a PS5 launch in 2020 would make the PS4 have only six.
Not including FF7R week in sales the PS4 needs to sell another ~1.5 million to outsell the PS3. How long sales stay high due to FF7R and Switch shortages is a big factor in helping that. In the end I doubt the PS4 will outsell the PS3 in Japan.