Updated mediawiki/extensions
Project: mediawiki/extensions/SemanticMediaWiki  f22e79ddddeed859d51cf281753cfc03e17377cd

\SMW\ObjectStorage, \SMW\SimpleDictionary, \SMW\ObjectDictionary

Introduces a simpler implementation of a dictionary and object storage
compared with the ArrayObject.

\SMW\ObjectStorage
Code coverage: 100%
CRAP: 6

\SMW\SimpleDictionary
Code coverage: 100%
CRAP: 10

## Usage
$dictionary = new SimpleDictionary( array( 'Foo' => 'Bar' ) );

$dictionary->has( 'Foo' ) returns true
$dictionary->get( 'Foo' ) returns 'Bar'
$dictionary->set( 'Foo', array( 'Lula', 'Bar') )
$dictionary->remove( 'Foo' )

## Runtime analysis

N-Array -> Array -> $s[] = array( "name" => "Adam", "age" => 35 );
H-Array -> SimpleDictionary -> $h->set( "name", "Adam" )->set( "age", 35 ); $s[] = $h->toArray();
O-Array -> ArrayObject -> $o->offsetSet( "name", "Adam" ); $o->offsetSet( "age", 35 ); $s[] = $o->getArrayCopy();

for( $x = 0; $x < 1; $x++ )
1) SMW\Test\SimpleDictionaryTest::testRuntimeComparison
This test printed output:
N-Array, Memory: 7856168 Execution time: 4.2915344238281E-5
H-Array, Memory: 7856168 Execution time: 0.00015687942504883
O-Array, Memory: 7856168 Execution time: 0.0001060962677002

for( $x = 0; $x < 100; $x++ )
1) SMW\Test\SimpleDictionaryTest::testRuntimeComparison
This test printed output:
N-Array, Memory: 7859744 Execution time: 0.00049209594726562
H-Array, Memory: 7859912 Execution time: 0.0050039291381836
O-Array, Memory: 7860184 Execution time: 0.0040531158447266

for( $x = 0; $x < 10000; $x++ )
1) SMW\Test\SimpleDictionaryTest::testRuntimeComparison
This test printed output:
N-Array, Memory: 11401200 Execution time: 0.054563999176025
H-Array, Memory: 11401632 Execution time: 0.56676602363586
O-Array, Memory: 11402272 Execution time: 0.41397500038147

For a large set of continues iterations, the native ArrayObject
implementation has an advantage over the SimpleDictionary implementation.

Change-Id: I8d8336f964c1e3adc71b1be006f2a406e5a4659b