q2K BHP
Black History Portal
THE BHP WIRE —
HIDDEN TRUTHS
What's New!
THE JOURNEY THROUGH TIME

Explore Black History

Explore the people, places, events, achievements, struggles and stories that shaped our journey.

✊🏾

Civil Rights

Movements, leaders, victories and the continuing fight for equality.

⚙️

Black Inventors

Innovation, patents, science, technology and world-changing contributions.

🏆

Sports

Pioneers, champions, Negro Leagues, records, activism and excellence.

♟️

People

Meet the people whose lives, choices and achievements shaped the journey.

📍

Places

Black towns, communities, institutions and places where history happened.

📜

Events

Moments that changed communities, movements, institutions and the nation.

Enter a person, place, event, or topic.
MY'STORY

The MOVE Fire

This is a personal recollection on the Move fire on May 13, 1985 Philadelphia police fired thousands of rounds at the MOVE house, city officials approved dropping an explosive device on the roof, the resulting fire was allowed to burn, 11 people—including five children—died, and 61 homes were destroyed. Philadelphia City Council later called it a “brutal attack carried out by the City of Philadelphia on its own citizens” and acknowledged that no individual faced criminal consequences for the bombing. One timeline correction worth preserving for the BHP record: the major previous MOVE-police confrontation was August 8, 1978, about seven years before the bombing, not a year or two earlier. Officer James Ramp was killed, other police and firefighters were wounded, nine MOVE members were later convicted, and television cameras recorded police beating Delbert Africa during his arrest. The 1985 MOVE Commission later specifically criticized city planners for failing to adequately use lessons from that 1978 confrontation. And that actually strengthens the point you’re making: 1985 did not happen without precedent or institutional memory. There had already been a deadly confrontation with MOVE, years of conflict, negotiations and police involvement before Osage Avenue.

MORE →
BLACK FACTS
The Truths They Never Taught You...

Ruler of the Mali Empire in the 14th century

Mansa Musa was the ruler of the Mali Empire in West Africa. Details recorded here should be sourced; unknown information is left blank.

MORE →
BHP gathered finds from its connected research sources. Showing the 4 strongest Black History matches.
← BACK TO RESULTS
Wikipedia

Tree shaking

In computing, tree shaking is a dead code elimination technique that is applied when bundling code with its dependencies. It is most commonly applied to dynamic languages, in practice most commonly JavaScript/ECMAScript.[1] Often contrasted with traditional single-library dead code elimination techniques common to minifiers, tree shaking eliminates unused functions from across the bundle by starting at the entry point and only including functions that may be executed.[2][3] It is succinctly described as "live code inclusion".

In less-dynamic languages such as C, ordinary dead-code elimination becomes equivalent to tree-shaking with whole program optimization, which also uses knowledge of entry points.

History

[edit]

Dead code elimination in dynamic languages is a much harder problem than in static languages. The idea of a "treeshaker" originated in LISP[4] in the 1990s. The idea is that all possible execution flows of a program can be represented as a tree of function calls, so that functions that are never called can be eliminated.

The algorithm was applied to JavaScript in Google Closure Tools and then to Dart in the dart2js compiler also written by Google, presented by Bob Nystrom in 2012[5][3] and described by the book Dart in Action by author Chris Buckett in 2013:

When code is converted from Dart to JavaScript the compiler does 'tree shaking'. In JavaScript you have to add an entire library even if you only need it for one function, but thanks to tree shaking the Dart-derived JavaScript only includes the individual functions that you need from a library

— Chris Buckett

The next wave of popularity of the term is attributed to Rich Harris's Rollup project[6] developed in 2015.

Relation to ECMAScript 6 modules

[edit]

The popularity of tree shaking in JavaScript is based on the fact that in contrast to CommonJS modules, ECMAScript 6 module-loading is static and thus the whole dependency tree can be deduced by statically parsing the syntax tree. Furthermore, ES6 imports can be done to the granularity of single named values (functions are values) instead of whole files. Thus tree shaking becomes an easy problem.[citation needed]

However, tree shaking does not only apply at the file or value levels: it can also work at the statement level, depending on the implementation.[citation needed]

Comparison to DCE techniques in compiled languages

[edit]

Tree-shaking at the source file level is analogous to the standard (C/C++/...) linker's handling of static libraries, which only links in the required object files.

Tree-shaking at the function/variable level is analogous to creating individual sections for functions and/or values (-ffunction-sections -fdata-sections) and having the linker remove unused sections (--gc-sections).

Tree-shaking at the statement level is analogous to compiler DCE under whole program optimization.

In all three cases, a concept of entry points exists to determine what is reachable and what is not.

References

[edit]
  1. ^ "Reduce JavaScript Payloads with Tree Shaking".
  2. ^ Harris, Rich (15 January 2019). "Tree-shaking versus dead code elimination". Retrieved 16 September 2020.
  3. ^ a b Ladd, Seth (29 January 2013). "Minification is not enough, you need tree shaking". Seth Ladd's Blog.
  4. ^ comp.lang.lisp What's a treeshaker?
  5. ^ Can Google Dart Solve JavaScript's Speed and Scale Problems?
  6. ^ How To Clean Up Your JavaScript Build With Tree Shaking

Source: Wikipedia. Article content is retrieved live through the MediaWiki API.

No preview image
Wikipedia

Tree shaking

In computing, tree shaking is a dead code elimination technique that is applied when bundling code with its dependencies. It is most commonly applied to dynamic languages, in practice most commonly JavaScript/ECMAScript. Often contrasted with traditional single-library dead code elimination techniques common to minifiers, tree shaking eliminates unused functions from across the bundle by starting at the entry point and only including functions that may be executed. It is succinctly described as "live code inclusion". In less-dynamic languages such as C, ordinary dead-code elimination becomes equivalent to tree-shaking with whole program optimization, which also uses knowledge of entry points.

MORE →
No preview image
Wikipedia

Shaking the Tree: Sixteen Golden Greats

Shaking the Tree: Sixteen Golden Greats is a compilation album by the English rock musician Peter Gabriel. It was released in 1990 as Gabriel's first career retrospective, including songs from his first solo album Peter Gabriel (I or Car) (1977), through Passion: Music for The Last Temptation of Christ (1989). It was remastered with most of Gabriel's catalogue in 2002. The vinyl version of the album is called Shaking the Tree: Twelve Golden Greats.

MORE →
No preview image
Wikipedia

Shaking the Tree (film)

Shaking the Tree is a 1990 American comedy-drama film directed by Duane Clark, starring Arye Gross, Gale Hansen, Doug Savant and Steven Wilde.

MORE →
No preview image
Wikipedia

Shaking the Tree (disambiguation)

Shaking the Tree is a 1990 compilation album by rock musician Peter Gabriel, and the name of a song from that album. Shaking the Tree may also refer to: Shaking the Tree (film), a 1990 comedy-drama by Duane Clark "Shaking the Tree" (Powers), a 2016 episode of the television series Powers Shaking the Tree (song), 1989 song by Youssou N'Dour and Peter Gabriel

MORE →
TOPIC OF THE DAY

Greenwood / Black Wall Street

Before the 1921 destruction of Tulsa’s Greenwood District, Black residents had created a remarkable center of business and community life. The district included stores, professional offices, entertainment venues and homes owned by Black citizens. Understanding Greenwood means learning what was built—not only what was burned.

MORE →
TRIVIA QUESTION OF THE DAY

Which heavyweight champion was known as the “Brown Bomber”?

Joe Louis.