Tenetur itaque dolorum mollitia facere reprehenderit praesentium ullam. Accusantium id et illo ut eum. Dolore rerum qui sit eveniet ut nesciunt quam. Molestias fugiat omnis laborum quam.

"Beating" C with 400 lines of unoptimized assembly

Earlier this week I ran into a fun quick blog post named
Beating C with 70 lines of Go,
which reimplements the basic functionality of wc in Go using various
approaches and compares their performance. Apparently it’s inspired by an
earlier Haskell-based post and several
other offshoots.

This reminded me of my earlier post about reimplementing wc in pure x64
, where I
also measured the performance of my program against wc.

The optimized approach taken in the Go implementation is very similar to what I
did in assembly, so it seemed like an interesting comparison. I started by
generating a ~580 MiB file using xmlgen
and ran the various versions against each other:

  • LC_TYPE=POSIX wc: 2.13 sec
  • wc-naive.go: 3.53 sec
  • wc-chunks.go: 1.37 sec
  • wcx64: 1.2 sec

Note the LC_TYPE setting for the system’s wc. This is important for a
fair comparison, because without this wc will attempt to do utf-8
decoding on all bytes in the file, which results in significant slowdowns. Since
the Go versions use byte-counts and so does my wcx64, I force the comparison
to be fair. In fact, this isn’t a bad result for Go – the straightforward
solution is almost as fast as the same approach direct-coded in assembly!

The Go blog post follows with parallelized versions which are much faster than
the serial one, but I’m excluding it here because all the other competitors are
single-threaded. This is not a serious benchmark anyway. If you prefer to
be serious, this response using SIMD-optimized C blows everything out of the water:

  • fastlwc: 0.11 sec

The conclusion? Well, there’s no real conclusion here, beyond that coding
exercises like this are fun in any language 🙂

Guitar Center, the largest retailer for musical instruments in the US, has filed for bankruptcy

Guitar Center, the largest retailer for musical instruments in the US, has filed for bankruptcy

guitar center
View of a Guitar Center store in Hollywood, California.

  • Guitar Center, the largest musical instrument retailer in the US, has filed for bankruptcy.
  • The company announced Saturday it was entering the Chapter 11 restructuring process, during which it’ll stay in business. Guitar Center said it expects to finish up the process by the end of the year.
  • Like other physical retailers, Guitar Center has felt the negative impacts of consumers’ increasing reliance on e-commerce, as well as the forced closures of many of its stores during the coronavirus pandemic.

Guitar Center, the largest retailer for musical instruments in the US, is the latest company to file for bankruptcy in the wake of the coronavirus pandemic.

The retailer announced Saturday it had filed for Chapter 11 bankruptcy protection “to significantly reduce our debt and enhance our ability to reinvest in our business.” Guitar Center aims to emerge from bankruptcy before the end of the year, the company said.

The possibility of Guitar Center’s bankruptcy filing was first reported in October by Bloomberg.

According to the company’s bankruptcy filings, Guitar Center has been forced to seek protection in part due to “the economic upheaval created by the persistence of the Covid-19 pandemic.” The company also faces a “significant debt burden” standing at roughly $1.3 billion in debt, the New York Times reports.

Guitar Center is one of the retailers hit hard by the coronavirus pandemic: The retailer told the New York Times in March it had closed 75% of its stores during nationwide lockdowns. Social-distancing efforts and stay-at-home measures have forced storefronts across the US not deemed essential businesses to temporarily close.

With nearly 300 storefronts across the US, Guitar Center heavily relies on in-person sales to stay afloat. Although the company has an online store for purchasing musical instruments, it’s been forced to offer alternatives — like virtual music lessons — during the pandemic to try to reverse its economic downturn.

According to its bankruptcy filing, Guitar Center said it had secured $165 million in new equity investments, and intends to reduce its debt by $800 million. The company will continue to pay its employees and operate its storefronts as normal during the Chapter 11 process, Guitar Center said.

Guitar Center is not the only retailer to have to file for bankruptcy during the pandemic. Both Century 21 and Lord & Taylor filed for bankruptcy this year, and made the decision to go out of business and close their storefronts. Other retailers like Muji, Brooks Brothers, JCPenney, and Pier 1 have also filed for bankruptcy in recent months.

Read the original article on Business Insider
 Image of businessinsider?d=yIl2AUoC8zA  Image of businessinsider?i=Yf1ctBX2o70:tXk Dw 8Gw0:F7zBnMyn0Lo  Image of businessinsider?i=Yf1ctBX2o70:tXk Dw 8Gw0:V sGLiPBpWU  Image of businessinsider?d=qj6IDK7rITs  Image of businessinsider?i=Yf1ctBX2o70:tXk Dw 8Gw0:gIN9vFwOqvQ

 Image of Yf1ctBX2o70