IN 1903, New Yorkers executed an elephant on Coney Island, effectively torturing her to death.

Accounts vary a bit, but it seems Topsy was a circus elephant who had been abused for years and then killed a man who had burned her on the trunk with a cigar. After her owners had no more use for her, Topsy was fed cyanide, electrocuted and then strangled with a winch. The Edison motion picture company made a film of it, “Electrocuting an Elephant.”

So maybe there is an arc of moral progress. After many allegations of mistreatment of animals, Ringling Brothers this month retired its circus elephants, sending them off to a life of leisure in Florida. SeaWorld said this spring that it would stop breeding orcas and would invest millions of dollars in rescuing and rehabilitating marine animals.

Meanwhile, Walmart responded to concerns for animal welfare by saying last month that it would shift toward cage-free eggs, following similar announcements by Costco, Denny’s, Wendy’s, Safeway, Starbucks and McDonald’s in the U.S. and Canada.

This is a humane revolution, and Wayne Pacelle, president of the Humane Society of the United States, has been at the forefront of it. Alternately bullying companies to do better and cooperating with those that do so, he outlines his approach in an excellent new book, “The Humane Economy.” These corporate changes have vast impact: Walmart or McDonald’s shapes the living conditions of more animals in a day than an animal shelter does in a decade.